Description
Sets the tooltip text on the user control that is specified by userControlID
.
Tooltips are text boxes that appear when a mouse is hovered over a user control. They are used to give the user feedback on the purpose and usage of a user control. They are not to be confused with the actual user control text.
All user controls have no tooltip text by default, unless created using the -tip
option.
Functional area
User Window
Command syntax
Syntax
setControlTip userControlID "tipText" |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
tipText | string | yes | Tooltip text to set for the user control |
userControlId | int | yes | ID of user control to set tooltip for. |
Flags
None
Return value
void
Examples
// Set the tooltip text of a control.
int $windowId;
int $controlId;
int $rect[4];
// First create a User Window to place the Control on
$windowId = `createWindow "MyWindow"`;
// Give the control a decent size/position
$rect[0] = 20;
$rect[1] = 20;
$rect[2] = 100;
$rect[3] = 40;
// Create a Text Box Control in the window. We can either
// set the tip here, or set it using setControlTip.
$controlId = `createTextBox $windowId -pos $rect`;
// Set the tip
setControlTip $controlId "Enter your name";