It is the standard system tool tip that displays text. The tool tip is a pop up window, so it is not taken into account for layout computation. Further more it does not inherit text properties from parent cell since it is an independent window.
The tool tip is displayed when the mouse is over the active part of its parent widget.
See Attributes Common to Widgets.
Name | Value Type | Default Value | Description | Comment | V. | Exp. |
---|---|---|---|---|---|---|
text |
empty |
Text to display in the tool tip |
When the string_id attribute is used, this attribute is not taken into account (since v1.4). |
1.0 |
No | |
string_id |
empty |
id of the string object to display. |
Replaces the 'text' attribute when used. |
1.4 |
No | |
Style | ||||||
tip_style |
'normal' or 'balloon' |
'normal |
Style of the system tool tip. |
Available on Windows only. |
1.0 |
No |
background_color |
System Default |
Background color of the tool tip |
Available on Windows only. |
1.0 |
No | |
delay_ms |
time (ms) |
System Default |
Time needed before the tool tip appears. |
Available on Windows only. |
1.0 |
No |
show_time_ms |
time (ms) |
System Default |
Duration of the tool tip activity. The tool tip will disappear after show_time_ms milliseconds when the mouse does not move. |
Available on Windows only. |
1.0 |
No |
show_on_click |
false |
Display the tool tip when a mouse click occurs. |
|
1.0 |
No |
Display a system tool tip when the mouse is over a black square skin:
<?xml version="1.0" encoding="utf-8" ?> <SKIN language_version="1.0" background_color="#000000" width="100" height="100"> <TOOLTIP text="Hello World!" /> </SKIN>
The same example with a 'balloon' style:
<?xml version="1.0" encoding="utf-8" ?> <SKIN language_version="1.0" background_color="#000000" width="100" height="100"> <TOOLTIP text="Hello World!" tip_style="balloon" /> </SKIN>
With custom colors:
<?xml version="1.0" encoding="utf-8" ?> <SKIN language_version="1.0" background_color="#000000" width="100" height="100"> <TOOLTIP text="Hello World!" tip_style="balloon" text_color="#ffffff" background_color="#880055" /> </SKIN>
For a multi line tool tip, you just need to insert carriage return characters in the HTML format:
<?xml version="1.0" encoding="utf-8" ?> <SKIN language_version="1.0" background_color="#000000" width="100" height="100"> <TOOLTIP text="Hello World!" /> </SKIN>
The font can be changed too:
<?xml version="1.0" encoding="utf-8" ?> <SKIN language_version="1.0" background_color="#000000" width="100" height="100"> <TOOLTIP text="Hello World!" font_face="Courier New" font_height="20" font_weight="bold" /> </SKIN>
Another example with a tool tip applied to an image. The tool tip is displayed only when the mouse is over the visible part of the image (defined by its mouse_mask file, or its mask if no mouse_mask is defined. See the Images section for more details):
<?xml version="1.0" encoding="utf-8" ?> <SKIN language_version="1.0" background_color="#559999"> <IMAGE image="img.bmp"> <TOOLTIP text="Hello World!" /> </IMAGE> </SKIN>
The directory contains the following files:
And the content of the image files is the following:
Img.bmp |
img_mask.bmp |
img_mouse_mask.bmp |
---|---|---|
This allows the tool tip to be displayed only when the mouse is over the red part of the image, not on the shadow (the mouse_mask is white only for the red surface of the image). Note that the image has been forced to mouse_sensitive by the tool tip, so that it's possible to know when the mouse is over the image. As a consequence mouse clicks on the image are catched by the image and are not forwarded to the background as it's the case for a simple image.