[Gambas-user] Substitute of the object names

Rolf-Werner Eilert eilert-sprachen at ...221...
Thu Oct 7 08:23:37 CEST 2010


Am 07.10.2010 08:11, schrieb Biro Zoltan:
> Hello,
>
> I will try to explain with my poor english exacly what I wish to do:
>
> 1.I have 20 pcs of valueboxes named: n1,n2,n3...n20
> 2.I have a variable named i defined as short
> 3.I wish to substitute the numbers from the valueboxes name like in
> folowing example:
>
> i=0
> for i=0 to list.count
>
>   'here I wist to give values to the valueboxes:
>
>   ni.value=list[i].text
>
> next
>
> Can I substitute the numbers with the value of i? How?
>
> Thank you.
>
> Zoli B.
>
>

Wouldn't it be easier to just make an array of valueboxes? That would 
enable you to write

ni[i].value = list[i].text

and Gambas would have direct access to each of the valueboxes during 
runtime.

Regards

Rolf




More information about the User mailing list