Jump to content
Sign in to follow this  
Grizzle

Some Dialog Questions

Recommended Posts

1. Is it possible to SET the value of checkboxes and if so, how do I do it? I have found the event handlers for getting the values, but nothing for programmatically setting them. I even tried ctrlSetText assuming it would accept an array formatted similar to what it spits on on the selchange event. No go.

2. Are variables defined in description.ext/config.cpp using the #define command available as globals? Doesn't appear to be that way. Seems to work the other way round with globals defined in a script being avail and usable in the description/config file though.

Please answer if you know. Believe me I have searched all over for this info and it can't be found though it's probably buried in that horribly inaccessible BIKI somewhere (which actually is great WHEN you can find what you need, but categorization and whatnot leaves a lot to be desired on that site.)

Share this post


Link to post
Share on other sites

1. With RscToolbox, I seem to recall I couldn't find a way to programmatically set them either, iirc.

However, you can initialise them though in the class def via the values array:

    rows = 2;
   columns = 1;
   strings[] = {"A", "B"};
   values[] = {0, 1};

Edit: Wiki now updated to indicate this.

Edited by Dr_Eyeball

Share this post


Link to post
Share on other sites
1. With RscToolbox, I seem to recall I couldn't find a way to programmatically set them either, iirc.

However, you can initialise them though in the class def via the values array:

    rows = 2;
   columns = 1;
   strings[] = {"A", "B"};
   values[] = {0, 1};

Edit: Wiki now updated to indicate this.

Ah - the values[] init would actually solve my problem! Thanks a ton!!

Well, on second thought that doesn't really help. Thanks for the suggestion though.

Now - I decided to use a listBox instead (yeah! - or so I thought) so here's my problem. I want to set the selected state of items in the listbox which uses this command syntax: control lbSetSelected [index, selected] the problem I have is getting the 'control' object. How do I get that? It won't take the IDC as an argument like MOST OTHER COMMANDS (ex: lbSetValue [idc, index, value] ). Why is that? Why do some commands accept the IDC while others (in the SAME CATEGORY) use a different method? Talk about frustration! Argh!

P.S. I have an entirely newfound appreciation for scripters and modders - man what a PITA this can be. I'm no stranger to coding either, but working with ARMA has been quite the challenge. Between desperately searching for that one missing property, or proper syntax and the necessary trial and error of it all I think I may just have to give up modding after I finish my current project!

Edit: Ok so I managed to get it to work, though I don't know if it's the proper way to do it. Using findDisplay with the IDC for my dialog seems to work:

_lb = (findDisplay 88230) displayCtrl GZL_IDC_LST_EFFECTS;

So is this the way one gets a reference to the control object or is there some other method I am overlooking?

Edited by Grizzle

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  

×