[Gambas-user] Object matrix problem

Fabien Bodard gambas.fr at ...626...
Thu Aug 2 12:42:58 CEST 2012


2012/8/2 fulippo_fulippo at ...152... <fulippo_fulippo at ...152...>

> Hi All
> i came from VB6 world , and i apreciate Gambas for linux
>
> I try
> to create a program , but i have problem on object matrix
> In vb i can
> do this : text1(1).text ,text1(2).text,text1(3).text...... text1(n).
> text , can i control textbox in this way on Gambas , there is similar
> solution ?
>
> Thanks in advances for your time
>
> Best Regards
>
> Francesco
>
>
>
> Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più
> di uno spot in TV. Per ogni nuovo abbonato 30 € di premio per te e per lui!
> Un amico al mese e parli e navighi sempre gratis:
> http://freelosophy.tiscali.it/
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

You need to register these objects in an array to do that


private Textes1 as New TextBox[]


Public sub _New
dim hobj as Object
for each  hObj in me.Children
  If hObj is TextBox then
   Textes1.Add(hObj)
  endif
end

Then you can use

Textes1[1].Text

-- 
Fabien Bodard



More information about the User mailing list