Jump to content
Sign in to follow this  
fn_Quiksilver

Resizing a display to fit text

Recommended Posts

Hi lads,

 

Are there established methods of resizing a "frame" to fit text?

Share this post


Link to post
Share on other sites
fnc_Resize_ctrl_totext = {
params ["_displayIDC","_ctrlIDC"];
_control =((findDisplay _displayIDC) displayCtrl _ctrlIDC);
_myControlPos = ctrlPosition _control;
_ctrlh = ctrlTextHeight _control;
_xpos = _myControlPos select 0;
_ypos = _myControlPos select 1;
_width = _myControlPos select 2;
_control ctrlSetPosition [_xpos,_ypos  ,_width ,_ctrlh];
_control ctrlCommit 0;
};

call it with the idd of yourdisplay & the idc of the controm you want to resize (after putting the text)
eg.
[123456,1600] call fnc_resize_ctrl_totext

  • Like 3

Share this post


Link to post
Share on other sites

Yeah, useful. I only ever really used for text inside RscControlsGroup hehe.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×