ctrlSetStructuredText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(example)
mNo edit summary
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]] {
|x2= 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 = [[findDisplay]] 46 [[ctrlCreate]] ["RscShortcutButton", -1];
button [[ctrlSetPosition]] [0,0,0.3,0.1];
button [[ctrlSetPosition]] [0,0,0.3,0.1];

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:
_control ctrlSetStructuredText parseText "First line<img image=data\isniper.paa /><br />Second line"
Example 2:
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