[Gambas-user] Selection from a list

Jussi Lahtinen jussi.lahtinen at ...626...
Thu Sep 3 13:43:54 CEST 2009


This code selects all items, when mode is multiple.

Dim ii As Integer

For ii = 0 To ListBox1.Count - 1
ListBox1[ii].Selected = True
Next

But I think I didn't understand your problem correctly...
What do you mean by " I have to make it "current" by
specifying the "index". " ?
How do you do that?
Please attach your code / part of it.


Jussi


On Thu, Sep 3, 2009 at 14:04, Aleksandrs Livshics<aleks.l at ...1865...> wrote:
> Hallo to everyone.
> Can anyone tell me whether a ListBox can be used to
> display a list with several items preselected and then
> to allow a user to change some part of this selection?
> I think mode "multiple" must allow to do this. However
> I do not understand how to preselect more than one item
> and how to get the indexes of the finally selected items,
> if there are more then one of them.
> My difficulty is due to the fact that if I want to set some
> item as "selected=TRUE" I have to make it "current" by
> specifying the "index". But by doing this I change the status
> of the item which was "current" before... It does not remain
> "selected=TRUE" , does it?
> I probably do not understand something.
> Alex
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list