ctrlSetTooltip: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(9 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
|descr= Sets tooltip text of given control. | |descr= Sets tooltip text of given control. | ||
{{Feature | | {{Feature|informative|If control supports URL property, like {{hl|RscActiveText}} for example, and the URL is set, tooltip text displayed on mouse over will be appended with URL text.}} | ||
|s1= control [[ctrlSetTooltip]] text | |s1= control [[ctrlSetTooltip]] text | ||
|p1= control: [[Control]] - | |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]] | ||
Line 29: | Line 29: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>_control ctrlSetTooltip "tooltip";</sqf> | ||
|x2= < | |x2= <sqf>findDisplay 10000 displayCtrl 10001 ctrlSetTooltip "ThisIsAGoodTip";</sqf> | ||
|x3= < | |x3= <sqf> | ||
with uiNamespace do | |||
{ | { | ||
bar = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscProgress", -1]; | bar = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscProgress", -1]; | ||
bar ctrlSetPosition [0,0,1,0.01]; | bar ctrlSetPosition [0,0,1,0.01]; | ||
bar | bar ctrlCommit 0; | ||
bar | bar progressSetPosition 0.75; | ||
bar | bar ctrlSetTooltip "lalalalalalalala"; | ||
};</ | }; | ||
</sqf> | |||
|seealso= [[ctrlSetTooltipColorBox]] [[ctrlSetTooltipColorShade]] [[ctrlSetTooltipColorText]] | |seealso= [[ctrlSetTooltipColorBox]] [[ctrlSetTooltipColorShade]] [[ctrlSetTooltipColorText]] | ||
Line 48: | Line 50: | ||
<dt></dt> | <dt></dt> | ||
<dd class="notedate">Posted on | <dd class="notedate">Posted on 2017-09-26 - 08:08 (UTC)</dd> | ||
<dt class="note">[[User:Demellion|Demellion]]</dt> | <dt class="note">[[User:Demellion|Demellion]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
'''NOTE''': If you want to | '''NOTE''': If you want to receive a multi-line tooltip, you can simply input newline escape symbol in your text: | ||
< | <sqf>_ctrl ctrlSetTooltip "Your text\nYour text on next line";</sqf> | ||
Localization files (stringtable.xml) also supports that. | Localization files (stringtable.xml) also supports that. | ||
</dd> | </dd> | ||
</dl> | </dl> |
Latest revision as of 11:34, 3 September 2024
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:
- 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
- Posted on 2017-09-26 - 08:08 (UTC)
- Demellion
-
NOTE: If you want to receive a multi-line tooltip, you can simply input newline escape symbol in your text:
Localization files (stringtable.xml) also supports that._ctrl ctrlSetTooltip "Your text\nYour text on next line";
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: GUI Control