[Gambas-user] Listbox.List(x) error

Benoit Minisini gambas at ...1...
Thu Sep 4 23:44:32 CEST 2008


On jeudi 04 septembre 2008, Sevoir wrote:
> Thx this working.
>
>
> Regards, Norbert
>
> 2008. 09. 4, csütörtök keltezéssel 21.44-kor Jacky ezt írta:
> > Le Thursday 04 September 2008 20:35:47 Sevoir, vous avez écrit :
> > > Hi All!
> > >
> > > I have a problem.
> > > I want get a Listbox item text value to a label.caption ..
> > > label.caption = ListBox.list(1)
> > > but I have an error message :
> > > Not a function
> > >
> > > What I mistaked?
> >
> >  label.caption = ListBox.list[1]
> >
> > Jacky
> >

The syntax in Gambas is different from the vb syntax:

Label.Caption = ListBox[1]

If you do Label.Caption = ListBox.List[1], you get the same result, because
you actually get the second element of what returns ListBox.List, which is an 
array of all listbox elements. If the listbox has 10000 items, you are 
killing a fly with a hammer then.

Regards,

-- 
Benoit Minisini




More information about the User mailing list