Re: [Gambas-user] Substitute of the object names

2010-10-07 Thread Biro Zoltan
Another simple solution: DIM x AS String[3] DIM i AS Short DIM obj AS Object[] = [n1, n2, n3] x[0] = "1" x[1] = "2" x[2] = "3" i = 0 FOR i = 0 TO 2 obj[i].text = x[i] NEXT Best regards, Zoli B. 2010. 10. 7, csütörtök keltezéssel 10.22-kor Rolf-Werner Eilert ezt írta: > Ok, there

Re: [Gambas-user] Substitute of the object names

2010-10-07 Thread Biro Zoltan
SOLVED!!! DIM x AS String[3] DIM i AS Short DIM obj AS Object x[0] = "1" x[1] = "2" x[2] = "3" i = 0 FOR i = 0 TO 2 FOR EACH obj IN sidp.Children IF Lower(object.Type(obj))="textbox" AND obj.name="n"&Str$(i+1) obj.text = x[i] ENDIF NEXT NEXT END Here I scanned all obje

Re: [Gambas-user] Substitute of the object names

2010-10-07 Thread Rolf-Werner Eilert
Ok, there is one thing you have to take care of, because Gambas works as C++ here and wants the arrays to be instantiated after declaration. So to make it easy, just add a NEW to the DIM line: DIM x AS NEW String[20] And now let me see how I did this in my programs... It's been a long time sin

Re: [Gambas-user] Substitute of the object names

2010-10-07 Thread Biro Zoltan
Thank you Rolf to helping me. Please take a look on the folowing piece of code: (I never used array of texboxes, but I think is something like I did here) PUBLIC SUB filltheboxes() DIM x AS String[20] DIM y[20] AS TextBox DIM i AS Short x[0] = "1" x[1] = "2" x[2] = "3" x[3] = "4" x[4] =

Re: [Gambas-user] Substitute of the object names

2010-10-06 Thread Rolf-Werner Eilert
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 >

[Gambas-user] Substitute of the object names

2010-10-06 Thread 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