[Gambas-user] Listbox.List(x) error
Ron_1st
ronstk at ...239...
Fri Sep 5 16:51:13 CEST 2008
On Thursday 04 September 2008, Sevoir wrote:
> 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?
>
> Regards, Sevoir
>
>
If I make comething like 'label.caption = ListBox.list(1)' and
get error messages i look to the line and see 2 posible mallfunctions
1) label.caption
2) ListBox.list(1)
Which one would be candidate ?
Firstway todo:
mytexttoshow = ListBox.list(1)
label.caption = mytexttoshow
Now you can see wich part of the _smart_ line is malfunction :)
Second way todo:
The error tells about 'Not a function'
Mostly functions are on the rightside of the '='
Second function passing arguments between '(' and ')'
So candidate is 'ListBox.list(1)'
Does 'list' as function/property exist
If exists then what is the return type?
Aahh I see in the help it is array.
How do we access a array element?
Again in the help I see by using '[indexnumber]'
So next line should solve
label.caption = ListBox.list[1]
Have fun :)
Best regards
Ron_1st
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
More information about the User
mailing list