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.


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to