BIS fnc ctrlFitToTextHeight: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(33 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= GUI


|1.00|= Game version
|descr= Resize structured text control to fit its text height.
____________________________________________________________________________________________


| <pre>/*
|s1= [control,offset,time] call [[BIS_fnc_ctrlFitToTextHeight]]
Description:
Resize structured text control to fit its text height
Parameters:
0: CONTROL
1: NUMBER - height offset (default is 0)
2: NUMBER - commit time (default is 0)
Returns:
NUMBER - text height
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p1= control: [[Control]] - the control which should be scaled
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_ctrlFitToTextHeight]]; --> |= Syntax
|p2= offset: [[Number]] - (Optional, default 0) offset


|p1= |= Parameter 1
|p3= time: [[Number]] - (Optional, default 0) commit time


| |= Return value
|r1= [[Number]] - text height
____________________________________________________________________________________________


|x1= <code></code> |=
|x1= <sqf>private _height = [_ctrl, 1.5, 3] call BIS_fnc_ctrlFitToTextHeight;</sqf>
____________________________________________________________________________________________
 
| |= See also


|seealso= [[ctrlCommitted]] [[ctrlSetPosition]] [[ctrlSetFade]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: GUI|{{uc:ctrlFitToTextHeight}}]]
[[Category:Functions|{{uc:ctrlFitToTextHeight}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:ctrlFitToTextHeight}}]]

Latest revision as of 15:51, 8 November 2023

Hover & click on the images for description

Description

Description:
Resize structured text control to fit its text height.
Execution:
call
Groups:
GUI

Syntax

Syntax:
[control,offset,time] call BIS_fnc_ctrlFitToTextHeight
Parameters:
control: Control - the control which should be scaled
offset: Number - (Optional, default 0) offset
time: Number - (Optional, default 0) commit time
Return Value:
Number - text height

Examples

Example 1:
private _height = [_ctrl, 1.5, 3] call BIS_fnc_ctrlFitToTextHeight;

Additional Information

See also:
ctrlCommitted ctrlSetPosition ctrlSetFade

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