OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: einherj on 25 Aug 2007, 15:52:57

Title: Multiple selection listbox
Post by: einherj on 25 Aug 2007, 15:52:57
I was unable to find a thread related to this with the search function.

I will now quote the "lbSetSelected" function's description:
Quote
Set the selection state of the given row of the given listbox.
Listbox must support multiple selection.

I presume the listbox can be made to support multiple selection via some description.ext classification line. What could that line be?
Title: Re: Multiple selection listbox
Post by: LCD on 25 Aug 2007, 15:58:32
listbox is somin in dialogs... reead da TUT (http://www.ofpec.com/ed_depot/index.php?action=details&id=37&page=0&game=OFP&type=tu&cat=sc) by vektorboson... shud b helpfull

LCD OUT
Title: Re: Multiple selection listbox
Post by: einherj on 25 Aug 2007, 16:05:18
I know what a listbox is and I know how to use them. Did you even read my post?

Actually the vektorboson's tutorial explains nothing related to the issue in hand.
Title: Re: Multiple selection listbox
Post by: h- on 25 Aug 2007, 16:24:47
Dialogs are listed as being under the 'advanced' category so I moved this here.

Carry on.  :cool2:
Title: Re: Multiple selection listbox
Post by: LCD on 25 Aug 2007, 16:33:04
lol d00d chill out :P  :cool2:

so dere was a lil misunderstandin :P

i think (didnt try it tho) dat its used 2 chose if da selection is higlighted (or selected)... use da row nd make it equal true itll make it higlight... but anywayz... y dont u try it ? :P

LCD OUT

p.s if im wrong... u dont have 2 kill me :P


ohh nd i forgot

WELCOME 2 OFPEC M8
Title: Re: Multiple selection listbox
Post by: Mandoble on 25 Aug 2007, 16:34:32
There seems to be two listbox control types: 5 (normal one) and 42 (didnt test that one). And three styles: 0 (single selection), 0x10 (textures) and 0x20 (multiple selection). You may play with these.
Title: Re: Multiple selection listbox
Post by: LCD on 25 Aug 2007, 16:36:50
ohhh now i understod da question  :blink: .......... just ignore me... im off 2 fell st00pid

LCD OUT
Title: Re: Multiple selection listbox
Post by: einherj on 25 Aug 2007, 17:15:55
No worries LCD, i just got a little frustrated.  :good:

It seems that the style 0x20 makes the listbox multiselectable so I defined a new style in my description.ext for easier remembering:
Code: [Select]
#define ST_MULTIPLESELECTION 0x20

I can now choose multiple items in the listbox by holding CTRL or SHIFT and selecting them

Thank you Mandoble for enlightening me in this matter :clap:
Title: Re: Multiple selection listbox
Post by: Spooner on 26 Aug 2007, 22:32:43
I was just about to ask this question, so thanks for that! I'd tried 0x10 already, but it just changed the look of the listbox, without allowing multiple-selection.