[Gambas-user] Arrays of widgets

neil lewis neil at ...233...
Fri Aug 13 23:09:59 CEST 2004


Laurent Carlier wrote:

>Le vendredi 13 Août 2004 22:46, neil lewis a écrit :
>  
>
>>Are there any plans to add arrays of widgets for Gambas?
>>
>>I recently used a set of a dozen PictureBoxes arranged in a grid pattern
>>for enabling easy user input for a program I am creating in Gambas, and
>>I had to program each widget with a separate block of code. It would be
>>much easier if one could group such a set of widgets into an array and
>>refer to them by suffix.
>>
>>    
>>
>
>You should use object[] array
>
>  DIM Boucle AS Integer 
>  DIM hObj AS Object 
>  DIM myObj AS new Object[]
>
>  
>  FOR boucle=0 TO 5
>    hObj=NEW Label(ME)
>    TxtTemp.Add (hObj)
>  NEXT
>
>
>then you should use myObj[index] for managing them
>
>  
>
Thanks Laurent, I'll give that a go.




More information about the User mailing list