ctrlSetText – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search

one of the endless uncertainties with sqf verbs

onButtonClick="ctrlSetText [999,'whatever']";

only works for controls via a CreateDialog

For CreateDisplay

_disp = ctrlParent (_this select 0); // find this control's parent (which happens to be a display)
_ctl=_disp displayCtrl 999; // get the control 
_ctl ctrlSetText 'Hello world.'";

There's clearly some engine internals which make the first inoperable. But, hellishly frustrating when displays and dialogs are so closely related.

Probably many of the ctlXYZ verbs work and dont work in above manner

Mikero (nee Ook?) 10:28, 2 July 2011 (CEST)