BIS fnc ctrlFitToTextHeight: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>\[\[private\]\] (_?[a-zA-Z0-9_]+) = \[([^\[]*)\] \[\[(call|spawn)\]\] \[\[(BI(N|S)_fnc_[a-zA-Z0-9_]+)\]\];?<\/code>" to "<sqf>private $1 = [$2] $3 $4;</sqf>")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(3 intermediate revisions by the same user not shown)
Line 8: Line 8:
|descr= Resize structured text control to fit its text height.
|descr= Resize structured text control to fit its text height.


|s1=[control,offset,time] call [[BIS_fnc_ctrlFitToTextHeight]]
|s1= [control,offset,time] call [[BIS_fnc_ctrlFitToTextHeight]]


|p1= control: [[Control]] - The control which should be scaled
|p1= control: [[Control]] - the control which should be scaled


|p2= offset: [[Number]] - (Optional, default 0) Offset
|p2= offset: [[Number]] - (Optional, default 0) offset


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


|r1= [[Number]] - Text height
|r1= [[Number]] - text height


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

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