Sets the tip text associated with a control.
GUICtrlSetTip ( controlID, tiptext [, "title" [, icon [, options]]] )
controlID | The control identifier (controlID) as returned by a GUICtrlCreate...() function, or -1 for the last created control. |
tiptext | Tip text that will be displayed when the mouse is hovered over the control. |
title | [optional] The title for the tooltip. |
icon | [optional] Pre-defined icon to show next to the title: requires a title. $TIP_NOICON (0) = No icon $TIP_INFOICON (1) = Info icon $TIP_WARNINGICON (2) = Warning icon $TIP_ERRORICON (3) = Error Icon Constants are defined in "AutoItConstants.au3". |
options | [optional] Sets different options for how the tooltip will be displayed (Can be added together): $TIP_BALLOON (1) = Display as Balloon Tip. $TIP_CENTER (2) = Center the tip horizontally along the control. Constants are defined in "AutoItConstants.au3". |
Success: | 1. |
Failure: | 0. |
This tip text is displayed in a tooltip rectangular area.
To skip an optional parameter, leaving its default value intact, use the Default keyword..
You may use @CR or @LF to create multi-line tooltips.
To display an icon, you must specify a non-empty title. The icon appears on the same row as the title and thus requires a title to be present.
#include <GUIConstantsEx.au3>
Example()
Func Example()
GUICreate("My GUI control tip") ; will create a dialog box that when displayed is centered
GUICtrlCreateLabel("my label", 10, 20)
GUICtrlSetTip(-1, "tip of my label")
GUISetState(@SW_SHOW)
; Loop until the user exits.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
EndSwitch
WEnd
EndFunc ;==>Example