[Gambas-user] order of children in container
jbskaggs
jbskaggs at ...1871...
Fri Apr 17 23:24:04 CEST 2009
I have a behavior I do not understand-
I have several panels with controls in them.
The controls are numbered sequentially and created in sequential order in
the containers. My problem is that sometimes the containers count the
controls backwards!
for example:
i = 0
FOR i = 0 TO Fsetupgame.Panel1.Children.Count - 1 ' eleven children
hValueBox1 = Fsetupgame.Panel1.Children[i] ' gets the
address of the already existing object
hd = Fsetupgame.panel14.Children[i]
a = hd.Text
'pfire.Children[i].name = hd.Text
PRINT a, hValueBox1.value
fc &= (", fc" & i)
IF hValueBox1.Value > 0
FOR c = 0 TO hValueBox1.Value - 1
fire &= (", fc" & i & "^" & a)
INC Fsetupgame.firecount
NEXT
ENDIF
NEXT
the ouput goes:
textbox11
textbox10
textbox9
textbox8
textbox7
textbox6
textbox5
textbox4
textbox3
textbox2
textbox1
rather than
textbox1
textbox2
textbox3
and so . . .
Why does this happen?
JB SKaggs
--
View this message in context: http://www.nabble.com/order-of-children-in-container-tp23106142p23106142.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list