OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: SnowSky on 26 Feb 2009, 16:31:36
-
Hey Guys,
first of all - Hello :).
I'm new here, and I'm also a Rookie in ArmA Scripting, so please excuse me if I ask sometimes stupid questions. Now I read some Tutorials, made some scripts, and now I actually pass those Dialogs.
My Problem is the following: I have 2 Listboxes, they are both "LB_TEXTURES" means that you can select only one Value in the Listbox, so far so good. Now If there has been something selected on the first Listbox, and I select something on the second now, I want that the selection in the first Listbox will be canceled (not removed, only unselected).
To reach this, I tried some ways, for example in my onLBSelChanged action:
"for [{_i=0},{_i< (lbSize IDC_DEFENSE_ID)},{_i=_i+1}] do {((findDisplay IDD_CONSTRUCTION_ID) displayCtrl IDC_DEFENSE_ID) lbSetSelected [_i, FALSE];};";
//For this try I set the Listboxes to LB_MULTI
or with lbSetCurSel I tried to set it on 0, or even 1, but it doesn't matter what I give in, because it doesn't change anything. Do you Guys know something I could try?
Otherwhise I think I have to do a WorkAround like deleting the content of the ListBox and then fill it again :(
well then,
yours sincerly, SnowSky
cheers
-
I tried that method too, to no avail. I ended up manually managing 2 multi-selection boxes, which can be selected 0 or more times, to get this functionality in SPON Money (http://www.ofpec.com/forum/index.php?topic=30551). Worked, though it was a bit messy...
-
Thanks for your reply!
Well after some hours of triing I was stucked of it - so now I did a WorkAround which wasn't such a bad Idea, seems it looks better now.