[Gambas-user] Listbox selected?

Benoit Minisini gambas at ...1...
Mon Mar 15 23:35:46 CET 2004


On Monday 15 March 2004 21:08, pezz wrote:
> Hi,
>
> In Visual basic you can do this with an extended Listbox:
>
> FOR n = 0 to List1.Listcount-1
> IF List1.Selected(n)=TRUE THEN
> <action>
> ENDIF
> NEXT n
>
> Listbox1.Selected doesn't seem to work in Gambas. How do I process multiple
> selections in an extended listbox?
>
>
> Thanks
>

FOR n = 0 to List1.Count - 1
  IF List1[n].Selected THEN
    <action>
  ENDIF
NEXT

Note: Comparing a boolean with TRUE or FALSE is useless. Test it directly!

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list