Setting toolTip and toolTipDelay
This lesson shows how to set the toolTip and toolTipDelay for a button.
Create a stack with a button.
1. Select 'New Mainstack' from the 'File' menu.
2. Click and drag a button object to the main window in the stack.
Open the Object Inspector
1. With the button still selected select 'Object Inspector' from the 'Object' menu.
Enter the toolTip text
1. Enter the toolTip text in the field next to the toolTip label.
2. Close the 'Object Inspector'
Change to the 'Browse Tool'
1. Select the 'Browse Tool'.
2. Hover over the button to see the tooltip.
A toolTip with multiple lines of text
1. Select the 'Edit Tool' (Pointer Tool).
2. Select the button.
3. Select the 'Object Inspector' from the 'Object' menu again.
4. Enter a line of text, then press enter, repeat for the wanted lines of text in the toolTip field in the 'Object Inspector'.
View the toolTip now with multiple lines of text
1. Select the Browse tool.
2. Hover over the button to see the toolTip with multiple lines of text.
Set the toolTipDelay
The toolTipDelay specifies how long the mouse pointer must point to an object before the tool tip appears. The default setting is a half a second (500 milliseconds). Setting the toolTipDelay to 200 will allow the toolTip to appear faster and setting it to 0 (zero) will disable the toolTip and it will not appear.
The toolTipDelay needs to be set via script. We will use the message box to set the delay to 200.
1. Select the 'Message Box'.
2. Enter "set the toolTipDelay to 200" and push the Return key on the keyboard.
3. Now when the mouse points at the button the toolTip will appear much faster.
Disable the toolTip via script
1. Change the 200 in the 'Message Box' to 0 and push the Return key on the keyboard.
2. Now when the mouse points at the button the toolTip will no longer appear. It is now disabled.
The toolTip can now be enabled at any time via script by setting the toolTipDelay to anything larger than 0 (zero) and the text that was set for that objects toolTip will still be there and will then be displayed.
William Roger Moseid
Create a toolTip with multiple lines of text within a script then set that toolTip in an object:
set the ToolTip of Btn "XYZ" to "Create a toolTip" & cr & "with multiple lines" & cr & "of text within a" & cr & "script then set " & cr & "that toolTip in an object"