Creating Tool Tips for Fields
All form fields can have tool tips, also sometimes referred to as balloon help. A tool tip is a short description of a field that is displayed when the pointer hovers over the field. The tooltip is displayed when the pointer is over either the prompt or the active part of the field. For fields that display multiple options—specifically, radio fields, toggle fields, and button-box fields—different tool tips can be set for each option.
Set tool tips using the hiToolTip property on the fields.
-
Set the
hiToolTipproperty on the field with the following command:
hiFormHandle->hiFieldSymbol->hiToolTip=toolTip
where hiFormHandle is the handle to the form returned byhiCreateAppForm, hiFieldSymbol is the symbol of the field (set with the?nameargument when the field was created), and toolTip is one of the following:-
A string:
"tooltip"
The tool tip is displayed when the pointer is over the field prompt, if any, or over the active part of the field. An empty string ("") ornilturns off the tool tip.
For example:myStringField=hiCreateStringField(?name ’myStringField)
hiFormHandle->myStringField->hiToolTip="description for myStringField" -
A list of strings:
list("tooltip1" "tooltip2" "tooltip3" ...)
Specify a list of tool tips for a radio, toggle, or button-box field. The tool tips are assigned to the items in the field in the order in which the items are listed in the?choicesargument of the field. The first tool tip is assigned to the first item in?choices, the second tool tip to the second item, and so on. Use an empty string ("") ornilfor an item for which you do not want to display a tooltip.
If the tool tip list has more strings than the number of items in the?choiceslist, the first extra string is assigned to the field prompt. Any other extra tool tips are ignored.
If the?choiceslist has more items than the tool tips list, the tool tips are assigned to the items in the order in which they are listed and the remaining items do not display any tool tips.
For example, in the following case:myRadioField=(?name ’myRadioField ?choices list("item1" "item2"))
hiFormHandle->myRadioField->hiToolTip=(list "tooltip1" "tooltip2" "tooltip3" "tooltip4"))tooltip1is assigned toitem1,tooltip2is assigned toitem2,tooltip3is assigned to the field prompt, andtooltip4is ignored.
In the following case:myRadioField=(?name ’myRadioField ?choices list("item1" "item2" "item3"))
hiFormHandle->myRadioField->hiToolTip=(list "tooltip1" "tooltip2"))tooltip1is assigned toitem1,tooltip2is assigned toitem2, anditem3does not have a tool tip.
-
A string:
-
Set the
hiToolTipvalue to an empty string ("") ornil.
For example:myForm->myStringField->hiToolTip=""
ormyForm->myStringField->hiToolTip=list("tooltip1" tooltip2" "" "tooltip3")
Related Topics
Creating Context Menus for Fields
Return to top