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

hiCreateButton

hiCreateButton(
?name s_fieldName 
?callback g_callback 
[ ?buttonText t_buttonText ] 
[ ?buttonIcon g_buttonIcon ] 
[ ?showTextWithIcon g_showTextWithIcon ]
[ ?help g_fieldHelp ] 
[ ?font t_font ] 
[ ?enabled g_enabled ]
[ ?invisible g_invisible ]
[ ?toolTip l_tooltip ]
) 
=> r_fieldHandle

Description

Creates a standalone push button for a form or two-dimensional menu. The button must have an associated callback procedure to be executed when the button is selected. A button-only field differs from a button box field in that there is no prompt associated with this button.

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 this field within a form. To reference it, use:

formHandle->hiFieldSym

?callback g_callback

  

A string, function object, or symbol type callback. The callback is called as soon as the button state changes.

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.

?buttonText t_buttonText

  

String that appears on the button.

?buttonIcon g_buttonIcon

  

The icon for the button.

This argument overrides any buttonText specified, unless g_showTextWithIcon is set to a non-nil value.

?showTextWithIcon g_showTextWithIcon

  

If you specify a non-nil value for this argument, and if both g_buttonIcon and t_buttonText are specified, then the button displays both an icon and text. The default value of this argument is nil.

?help g_fieldHelp

A string or symbol used to reference help. If not specified, s_fieldName is used. This argument is currently not used.

?font t_font

A font argument is accepted but is not supported at this time.

?enabled g_enabled

  

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

?invisible g_invisible

  

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

?toolTip l_tooltip

Specify a list of strings to be used as tooltips for buttons in the form.

Value Returned

r_fieldHandle

Handle to the button.

Examples

Creates a new button User Button and specifies a tooltip My Tooltip for this button.

userButton = hiCreateButton(
    ?name    'userButton
    ?buttonText "User Button"
    ?toolTip "My Tooltip"
    )

Related Topics

Form and Field Functions

Creating Context Menus for Fields


Return to top
 ⠀
X