fn_Quiksilver 1636 Posted June 8, 2018 Hi lads, Are there established methods of resizing a "frame" to fit text? Share this post Link to post Share on other sites
Mr H. 402 Posted June 8, 2018 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 3 Share this post Link to post Share on other sites
HazJ 1289 Posted June 8, 2018 There is also: https://community.bistudio.com/wiki/ctrlTextWidth Either something like what @Mr H. said or you could just add frame to the text style in the first place? Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted June 8, 2018 ahh "ctrlTextHeight" thank you, a command i haven't used before :) Share this post Link to post Share on other sites
HazJ 1289 Posted June 8, 2018 Yeah, useful. I only ever really used for text inside RscControlsGroup hehe. 1 Share this post Link to post Share on other sites