ctrlSetTooltip: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.00 | |1.00 | ||
|gr1= GUI Control | |gr1= GUI Control | ||
| Sets tooltip text of given control. | | Sets tooltip text of given control. | ||
{{Informative | If control supports URL property, like <tt>RscActiveText</tt> for example, and the URL is set, tooltip text displayed on mouse over will be appended with URL text.}} | {{Informative | If control supports URL property, like <tt>RscActiveText</tt> for example, and the URL is set, tooltip text displayed on mouse over will be appended with URL text.}} | ||
| control '''ctrlSetTooltip''' text | | control '''ctrlSetTooltip''' text | ||
|p1= control: [[Control]] - Any [[Dialogs|control type]], (except for CT_STATIC & CT_STRUCTURED_TEXT, although Arma 3 now supports these too) | |p1= control: [[Control]] - Any [[Dialogs|control type]], (except for CT_STATIC & CT_STRUCTURED_TEXT, although Arma 3 now supports these too) | ||
|p2= text: [[String]] | |p2= text: [[String]] | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>_control [[ctrlSetTooltip]] "tooltip";</code> | |x1= <code>_control [[ctrlSetTooltip]] "tooltip";</code> | ||
|x2= <code>[[findDisplay]] 10000 [[displayCtrl]] 10001 [[ctrlSetTooltip]] "ThisIsAGoodTip";</code> | |x2= <code>[[findDisplay]] 10000 [[displayCtrl]] 10001 [[ctrlSetTooltip]] "ThisIsAGoodTip";</code> | ||
|x3= <code>[[with]] [[uiNamespace]] [[do]] | |x3= <code>[[with]] [[uiNamespace]] [[do]] | ||
Line 28: | Line 28: | ||
bar [[progressSetPosition]] 0.75; | bar [[progressSetPosition]] 0.75; | ||
bar [[ctrlSetTooltip]] "lalalalalalalala"; | bar [[ctrlSetTooltip]] "lalalalalalalala"; | ||
};</code> | };</code> | ||
|[[ctrlSetTooltipColorBox]], [[ctrlSetTooltipColorShade]], [[ctrlSetTooltipColorText]] | |[[ctrlSetTooltipColorBox]], [[ctrlSetTooltipColorShade]], [[ctrlSetTooltipColorText]] | ||
}} | }} |
Revision as of 00:27, 18 January 2021
Description
- Description:
- Sets tooltip text of given control.
- Groups:
- GUI Control
Syntax
- Syntax:
- control ctrlSetTooltip text
- Parameters:
- control: Control - Any control type, (except for CT_STATIC & CT_STRUCTURED_TEXT, although Arma 3 now supports these too)
- text: String
- Return Value:
- Nothing
Examples
- Example 1:
_control ctrlSetTooltip "tooltip";
- Example 2:
findDisplay 10000 displayCtrl 10001 ctrlSetTooltip "ThisIsAGoodTip";
- Example 3:
with uiNamespace do { bar = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscProgress", -1]; bar ctrlSetPosition [0,0,1,0.01]; bar ctrlCommit 0; bar progressSetPosition 0.75; bar ctrlSetTooltip "lalalalalalalala"; };
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Bottom Section
- Posted on September 26, 2017 - 08:08 (UTC)
- Demellion
-
NOTE: If you want to recieve a multi-line tooltip, you can simply input newline escape symbol in your text:
_ctrl ctrlSetTooltip "Your text\nYour text on next line";
Localization files (stringtable.xml) also supports that.