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

hiCreateSpinBox

hiCreateSpinBox(
?name s_fieldName
[ ?prompt t_prompt ]
[ ?help g_fieldHelp ]
[ ?value g_value ]
[ ?defValue g_defaultValue ]
[ ?font t_fontName ]
[ ?callback g_callback ]
[ ?range l_rangeOfItems ]
[ ?arrowOrientation g_arrowOrientation ]
[ ?shadowed g_shadowed ]
[ ?enabled g_enabled ]
[ ?editable g_editable ]
[ ?obeyWidth g_obeyWidth ]
[ ?invisible g_invisible ]
[ ?wrapAround g_wraparound ]
[ ?justification s_justification ]
)
=> r_fieldHandle

Description

Creates a spin box field, which contains a range of items that users can cycle through. The spin box field can only contain integers. For floating point numbers, use hiCreateFloatSpinBox.

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

?name s_fieldName

Handle to the spin box field. To reference it, use:

formHandle->hiFieldSym

?prompt t_prompt

The name that appears next to the spin box field, specified as a string.

?help g_fieldHelp

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

value g_value

The initial and current value of the field. g_value must be an integer within the range specified by l_rangeOfItems.

?defValue g_defaultValue

  

The default value of the field. g_defaultValue must be an integer within the range specified by l_rangeOfItems.

?font t_fontName

This optional argument is accepted but not supported currently.

?callback g_callback

  

A string, function object, or symbol type callback. If the callback is of string type, you can specify one or more SKILL functions or even multiple SKILL statements that should be executed when the value of the field changes.

?range l_rangeOfItems

  

A list of two integers defining the range of values in the spin box field. The first integer must be less than the second integer.

For example:

?range list(-12 12)

?arrowOrientation g_arrowOrientation

  

This argument is now ignored. Arrows that are used to cycle through the spin box field are always vertical and are always displayed on the right side of the field.

?shadowed g_shadowed

  

This argument is now ignored. There is always a shadow box around the arrows in the spin box field.

?enabled g_enabled

  

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

?editable g_editable

  

t or nil. Specify t if you want the field to be editable; specify nil if you want it to be read-only.

?obeyWidth g_obeyWidth

  

t or nil. Specify t if you want the spinbox field to follow the width specified in the 2D attributes when the form is created. The default value is nil, which means the width specified in the 2D attributes is ignored.

For information on 2D attributes, see Two Dimensional Form Layout.

?invisible g_invisible

  

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

?wrapAround g_wraparound

  

Increments or decrements the spin box field as normal, but stop at the max/min values respectively. The default value is t.

?justification s_justification

  

Specifies one of the following symbols for the value added to the spinbox field: ’left, ’center, or ’right.
The default value is ’left.

Values Returned

r_fieldHandle

Handle to the spin box field.

Examples

spinField = hiCreateSpinBox(
      ?name 'spinField
      ?prompt "Spin box: "
      ?arrowOrientation 'vertical
      ?range '(1 100)
      ?value 3
      ?defValue 100
      ?callback "callbackOne"
      ?wrapAround nil
)

Related Topics

Form and Field Functions

Creating Context Menus for Fields

hiCreateFloatSpinBox


Return to top
 ⠀
X