hiCreateLayerCyclicField
hiCreateLayerCyclicField(
d_techFileId
t_fieldPrompt
t_callback
l_layers
[ l_LPpair ]
[ s_fieldName ]
)
=> r_fieldHandle
Description
Creates a cyclic field entry containing icon representations of specified layers for a form.
This field can also have a context menu, that is, a pop-up menu that is displayed when you right-click on the field.
For information on creating tooltips for fields, see Creating Tool Tips for Fields.
Arguments
|
d_techFileId
|
Handle representing a techfile object.
|
|
t_fieldPrompt
|
Prompt string that appears in this field. To reference it, use:
formHandle->hiLayerField->prompt
|
|
t_callback
|
Callback string for this field. If a callback is specified, the value of the item selected is appended to this callback before being executed by SKILL.
The value of this field is always a list representing a layer icon. This value can be referenced by:
form->hiLayerField->value
The value is always a list containing the icon representation of the layer followed by a string representation. For example:
(50331991 106 26 "device (drawing1)")
The first three elements in this list represent the cyclic icon; the fourth element is the layer’s name followed by its purpose in parentheses.
|
|
l_layers
|
List containing the layers that should be displayed as possible choices for this field. Each layer is represented as a list of two strings—layer name and layer purpose.
For example:
list( list("device" "drawing1") list("y0" "drawing") list("y1" "drawing") list("y2" "drawing") )
The layers specified must be defined in d_techFileId. If nil is specified, all layers in d_techFileId is displayed.
|
|
l_LPpair
|
An optional argument specifying the initial value of this layer field. This argument is a list containing the layer name (or number) and purpose. This layer must exist in d_techFileId. If not specified, the first layer in the list l_layers becomes the initial value.
|
|
s_fieldName
|
Handle to the field. If you do not specify this argument, the default name is ’hiLayerField.
To reference the field after the form is created, use:
formHandle -> hiFieldSym
|
Values Returned
|
r_fieldHandle
|
Handle to the field.
|
Related Topics
Form and Field Functions
Creating Context Menus for Fields
Return to top