ctrlSetStructuredText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(wikilinking description/example, added seealso)
(example)
Line 20: Line 20:
   
   
|x1= <code>_control [[ctrlSetStructuredText]] [[parseText]] "First line<img image<nowiki>=</nowiki>data\isniper.paa /><nowiki><br /></nowiki>Second line"</code> |= Example 1
|x1= <code>_control [[ctrlSetStructuredText]] [[parseText]] "First line<img image<nowiki>=</nowiki>data\isniper.paa /><nowiki><br /></nowiki>Second line"</code> |= Example 1
|x1= To center text vertically, add extra line above with blank space (&amp;#160;) and set its size to adjust:<code>[[with]] [[uiNamespace]] [[do]] {
button = [[findDisplay]] 46 [[ctrlCreate]] ["RscShortcutButton", -1];
button [[ctrlSetPosition]] [0,0,0.3,0.1];
button [[ctrlCommit]] 0;
button [[ctrlSetStructuredText]] [[parseText]]
"<t size='0.5'>&amp;#160;</t><nowiki><br/></nowiki><t size='1' align='center'>Button Text&amp;#160;&amp;#160;</t>";
};</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[composeText]], [[parseText]], [[text]] |= See also
| [[Structured Text]], [[composeText]], [[parseText]], [[text]] |= See also


}}
}}

Revision as of 13:03, 13 November 2015

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Set the structured text which will be displayed in structured text control.
Groups:
Uncategorised

Syntax

Syntax:
control ctrlSetStructuredText structuredText
Parameters:
control: Control
structuredText: Structured Text
Return Value:
Nothing

Examples

Example 1:
To center text vertically, add extra line above with blank space (&#160;) and set its size to adjust:with uiNamespace do { button = findDisplay 46 ctrlCreate ["RscShortcutButton", -1]; button ctrlSetPosition [0,0,0.3,0.1]; button ctrlCommit 0; button ctrlSetStructuredText parseText "<t size='0.5'>&#160;</t><br/><t size='1' align='center'>Button Text&#160;&#160;</t>"; };

Additional Information

See also:
Structured TextcomposeTextparseTexttext

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

Notes

Bottom Section