HereIsJones 20 Posted June 16, 2021 I've got my dialogs running now, save for one item. To set the text of a button, I can use... ctrlSetText [idc, text] ...but to set the tooltip, I have to use something entirely different... control ctrlSetTooltip text So how do I get a handle on the control? Is it _control = display displayCtrl idc? It seems odd to call displayCtrl when the controls are already displayed as per the class I created. Share this post Link to post Share on other sites
7erra 629 Posted June 16, 2021 the first syntax is not entirely safe. if you have multiple dialogs open it might not change the text of the control you are aiming for. the other syntax with "_ctrl ctrlSetText "text"; " is the better option. 2 hours ago, HereIsJones said: So how do I get a handle on the control? Is it _control = display displayCtrl idc? yes. 2 hours ago, HereIsJones said: It seems odd to call displayCtrl when the controls are already displayed as per the class I created. config and sqf are two very different worlds. unfortunately, getting control handles is tedious. the usual concept would be: Use _display = findDisplay IDD; to get the display (or use the params from the onLoad UIEH*) Then use _ctrl = _display displayCtrl IDC; to get your control Always use the syntax with _ctrl COMMAND rightArguments instead of relying on the idc *Using the onLoad UIEH and params is the most elegant way. i am going to add some info to https://community.bistudio.com/wiki/GUI_Tutorial on how BI structures their UI scripts. 1 1 Share this post Link to post Share on other sites
killzone_kid 1329 Posted June 17, 2021 12 hours ago, HereIsJones said: So how do I get a handle on the control? From next dev you dont need display if you have dialog open _control = displayCtrl idchttps://community.bistudio.com/wiki/displayCtrl 1 Share this post Link to post Share on other sites
7erra 629 Posted June 17, 2021 21 hours ago, 7erra said: i am going to add some info to https://community.bistudio.com/wiki/GUI_Tutorial on how BI structures their UI scripts. https://community.bistudio.com/wiki/GUI_Tutorial#UI_Scripts There it is 2 Share this post Link to post Share on other sites