Jump to content
Sign in to follow this  
Rothwell

ctrlSetText / ctrlText not working

Recommended Posts

I'm making a dialog, and have a button of type 16; I have the button all set up, and initialized to say "Join Squad". I then want the button to say "Leave Squad" when pressed. Here's my code:

hint format["clicked: %1",_idc];
_text = ctrlText _idc;
hint format["says: %1",_text];
ctrlSetText [_idc, "Leave Squad"];

the hints show me that i have the correct idc being sent, but the second hint prints out "says: ", so ctrlText isn't working. Also, the text on the button never changes.

To be sure I had the right idc, i put in: ctrlShow [_idc, false]; which successfully hid the button.... any ideas why the text won't work for me?

Share this post


Link to post
Share on other sites

Use _control ctrlSetText _text;

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  

×