ctrlSetTooltip: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]2(\|.*)\]\]" to "{{GameCategory|arma2|Scripting Commands}}")
m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(49 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma1 |Game name=
|game1= arma1
|version1= 1.00


|1.00|Game version=
|game2= arma2
|version2= 1.00


|gr1= GUI Control |GROUP1=
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| Sets tooltip text of given control.
|game4= tkoh
{{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.}} |DESCRIPTION=
|version4= 1.00
____________________________________________________________________________________________


| control '''ctrlSetTooltip''' text |SYNTAX=
|game5= arma3
|version5= 0.50


|p1= control: [[Control]] - Any [[Dialogs|control type]], (except for CT_STATIC & CT_STRUCTURED_TEXT, although Arma 3 now supports these too) |PARAMETER1=
|gr1= GUI Control


|p2= text: [[String]] |PARAMETER2=
|descr= Sets tooltip text of given control.
{{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.}}


| [[Nothing]] |RETURNVALUE=
|s1= control [[ctrlSetTooltip]] text
____________________________________________________________________________________________
 
|x1= <code>_control [[ctrlSetTooltip]] "tooltip";</code> |EXAMPLE1=
|x2= <code>[[findDisplay]] 10000 [[displayCtrl]] 10001 [[ctrlSetTooltip]] "ThisIsAGoodTip";</code> |EXAMPLE2=


|x3= <code>[[with]] [[uiNamespace]] [[do]]
|p1= control: [[Control]] - any [[Dialogs|control type]], (except for CT_STATIC & CT_STRUCTURED_TEXT, although Arma 3 now supports these too)
{
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";
};</code> |EXAMPLE3=
____________________________________________________________________________________________


|[[ctrlSetTooltipColorBox]], [[ctrlSetTooltipColorShade]], [[ctrlSetTooltipColorText]]  |SEEALSO=
|p2= text: [[String]]


}}
|r1= [[Nothing]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>_control ctrlSetTooltip "tooltip";</sqf>
<dl class="command_description">
|x2= <sqf>findDisplay 10000 displayCtrl 10001 ctrlSetTooltip "ThisIsAGoodTip";</sqf>
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x3= <sqf>
</dl>
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";
};
</sqf>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[ctrlSetTooltipColorBox]] [[ctrlSetTooltipColorShade]] [[ctrlSetTooltipColorText]]
}}


[[Category:Scripting Commands|CTRLSETTOOLTIP]]
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}


<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dd class="notedate">Posted on September 26, 2017 - 08:08 (UTC)</dd>
 
<dt></dt>
<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 recieve a multi-line tooltip, you can simply input newline escape symbol in your text:
'''NOTE''': If you want to receive a multi-line tooltip, you can simply input newline escape symbol in your text:
<code>_ctrl ctrlSetTooltip "Your text\nYour text on next line";</code>  
<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>
<!-- DISCONTINUE Notes -->

Latest revision as of 11:34, 3 September 2024

Hover & click on the images for description

Description

Description:
Sets tooltip text of given control.
If control supports URL property, like RscActiveText for example, and the URL is set, tooltip text displayed on mouse over will be appended with URL text.
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

See also:
ctrlSetTooltipColorBox ctrlSetTooltipColorShade ctrlSetTooltipColorText

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:
_ctrl ctrlSetTooltip "Your text\nYour text on next line";
Localization files (stringtable.xml) also supports that.