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? 
 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to