Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiCreateScrollRegion

hiCreateScrollRegion(
?name s_name
[ ?fields l_fieldEntries ]
[ ?attachmentList l_fieldAttachments ]
[ ?tabOrderIsAddOrder g_tabOrderIsAddOrder ]
[ ?labelText t_labelText ] 
[ ?borderWidth x_borderWidth ] 
[ ?scrollBars g_scrollBars ]
[ ?rightMargin x_rightMargin ]
[ ?bottomMargin x_bottomMargin ]
[ ?help g_help ]
[ ?invisible g_invisible ]
[ ?enabled g_enabled ]
)
=> r_fieldHandle

Description

Creates a scroll region field, which can be scrolled and can contain any type of field. A scroll region field is like a sub-form within a form.

A scroll region field can  be used as a field only on 2D forms. Once the field is instantiated, it is referenced through the form that contains it (see the description for the s_name argument below for more information).

A scroll region field can be specified as a form field for all functions that take form field arguments. It can also be specified as the form argument for all functions for adding, moving, resizing and deleting fields from a form.

A scroll region field can also have a context menu, that is, a pop-up menu that is displayed when you right-click on the field.

A scroll region field that has an ?attachmentList specified does not get scroll bars.

Do not place a scroll region field twice in one form or two scroll region fields with the same name in one form.

You cannot place a scroll region field that has field attachments inside a form or scroll region field that does not have field attachments.

For information on creating tooltips for fields, see Creating Tool Tips for Fields.

Arguments

?name s_name

Handle to the scroll region field within a form. Once the form is instantiated, the field is referenced through the form. For example, to update the fields or access properties in a scroll region field  myRegion which is in a form myForm, you use:

myForm->myRegion

?fields l_fieldEntries

  

List of field descriptors returned from the field creation routines. These can be fields of any type, including other scroll region fields. You must use at least one field entry. There is no upper limit on the number of fields you can use. You must specify 2D attributes for each field entry.

If the field entries list includes any scroll region fields, the scroll region field is copied. Scroll region fields are never shared.

All fields placed in a scroll region field must be referenced through the form and scroll region field. If the scroll region field is within another scroll region field, then its fields are accessed through the form and both scroll region fields. For example, to access the value of a field myField, which is in a scroll region field myRegion in a form myForm, you use:

myForm->myRegion->myField->value

In the above example, if you also have a myRegion2 with a myField2, then to access the value of myField2 you use:

myForm->myRegion->myRegion2->myField2->value

In case you want to place a scroll region field in an hiLayout form, the ?fields list must contain only an hiLayout. Similarly, it applies to the ?field list for a tab field that needs to be placed in an hiLayout form. The ?fields list passed to hiCreateTabField must contain only an hiLayout for each page, where each page of a tab field is a scroll region.

The hiScrollRegionSym is a property on each field in a form that exists after the form is displayed and that identifies whether or not that field is contained in a scroll region or tab page. If the value of the property is nil, the field is at the top level of the form. If it is non-nil, it is the symbol name of the scroll region that contains that field.

?attachmentList l_fieldAttachments

  

List of field attachments. Field attachments determine how the two-dimensional attributes for a field are used to position that field in the scroll region. The first field attachment is applied to the first field in l_fieldEntries, the second to the second field, and so forth. You must have the same number of attachments in l_fieldAttachments as the number of fields in l_fieldEntries. If you do not want to specify a field attachment for a field, use nil or 0.

Each field attachment in l_fieldAttachments consists of a bitwise OR of a list of constants. Each constant is a specification for a side of the field (left, right, top, and bottom). These attachment specifications for the sides of a field can be positional or percentage attachments.

For example, an l_fieldAttachments list could be:

(constant|constant|constant|constant constant|constant nil constant|constant|constant)

For details about field attachments and how to use positional and percentage constants, see Field Attachments.

A scroll region field that has an ?attachmentList specified does not get scroll bars.

You cannot place a scroll region field that has field attachments inside a form or scroll region field that does not have field attachments.

?tabOrderIsAddOrder g_tabOrderIsAddOrder

  

t or nil. Determines the order in which fields are traversed when the Tab key is pressed. If you specify t, the nextField property is automatically set for the fields and the traversal order is the order in which fields are added to the form (that is, the order in which they are listed in the l_fieldEntries list). If you specify nil, the default traversal order is based on the form layout—left-to-right and top-to-bottom— beginning with the field at the top-left corner of the form. The default value of g_tabOrderIsAddOrder is nil.

The nextField property set on a field (to any non-nil value) overrides the g_tabOrderIsAddOrder value.

?labelText t_labelText

  

Title of the scroll region field. It is justified to the upper left corner of the bounding box of the field.

?borderWidth x_borderWidth

  

Thickness of the border shadow in pixels. The default is 2. When scroll bars appear, the border shrinks in size by the amount of space taken up by the scroll bars.

This property can be changed interactively at any time, even after the scroll region field has been instantiated.

?scrollBars g_scrollBars

  

Controls the appearance of scroll bars. Can have the following values:

’dynamic

’static/t

nil

(t|nil t|nil)

scroll bars automatically appear if a field that extends beyond the edge of the scroll region field is added.

scroll bars are always present, whether or not a field extends beyond the boundary of the scroll region field.

scroll bars are never present, even if a field extends beyond the boundary of the scroll region field.

Controls each scroll bar—horizontal and vertical—individually. If the first element in the list is t, the horizontal scroll bar is always present. If the second element in the list is t, the vertical scroll bar is present.

’dynamic or ’static cannot be used as values in this list.

If you use this list as the value of g_scrollBars, the horizontal and vertical scroll bars cannot be made dynamic.

Note: The scroll bars property can only be set when you create the scroll region field. Once the field is instantiated, you cannot change this property.

?rightMargin x_rightMargin

  

Distance, in pixels, between the right edge of the border shadow and the edge of the field. The default is 0.

The visible part of the scroll region is the width of the field minus the x_rightMargin.

This property can be changed interactively at any time, even after the scroll region field is instantiated.

?bottomMargin x_bottomMargin

  

Distance, in pixels, between the bottom edge of the border shadow and the edge of the field. The default is 0.

The visible part of the scroll region is the height of the field minus the x_bottomMargin.

This property can be changed interactively at any time, even after the scroll region field is instantiated.

?help g_help

A string, symbol, list of strings, or list of symbols used to reference help. If not specified, s_name is used. This argument is currently not used.

?invisible g_invisible

  

Specifies whether the layout and the fields within are invisible. The default value is nil.

?enabled g_enabled

  

Specifies whether the fields in the layout are enabled. The default value is t.

Value Returned

r_fieldHandle

Handle to the scroll region field created.

Related Topics

Form and Field Functions

Form Layout

Creating Context Menus for Fields


Return to top
 ⠀
X