[Gambas-user] Columnview key

Benoit Minisini gambas at ...1...
Tue Dec 27 16:35:01 CET 2005


On Monday 26 December 2005 10:09, Rohnny Stormo wrote:
> Hi group.
>
> I have a Columview with x number of items in. The key is made out of
> inserted time.
> Now I need to get the columns back for futher use. Is there an example
> of this?
>
> I have'nt found a a solution of retriew the key. I want something like
> this.
>
> Dim i as integer
> for i = 0 to columnview1.count -1
>     key = columnview1[i].key
> -------------------------------------^ Gambas want the key here.
>
>     'get x 2
>     field2_in_column = columnview1[key,1].text
> next
>
> I could use count+1 but it do fail when I delete 1 from the columnview
>
> Another solution could be
> for i = 0 to columnview1.count -1
>     Columnview1[i].selected=true
> '--------------------------^ Again the key should in here , grrr
>     key = Columnview1.key
>     'get x 2
>     field2_in_column = columnview1[key,1].text
> next
>
> Running Gambas 1.9.22
>
> Regards
>

If you want to access column view items from a numeric index, then use this 
numeric index as key.

You will be always mixed up if you actually have two different keys in mind (a 
numeric index and a string key).

Regards,

-- 
Benoit Minisini





More information about the User mailing list