[RESOLVED] [2005] Question about looping through controls
When looping through controls inside of a container, what is the logic behind the order of each control being looped?
Basically I have about 5 checkboxes in a container and I am looping through them all to find which is checked, but it seems it is looping from the bottom to the top, is there anyway to change the order or am I missing a property that might change it?
Thanks
Re: [2005] Question about looping through controls
Just from my observation, it seems that:
1. If the controls are added at design time, the loop will be in reverse of the order that they were added to the controls collection.
2. If the controls are added at run time (dynamically), the loop will loop in the same order they were added to the control collection.
Can anyone confirm this?
Re: [2005] Question about looping through controls
It depends on the order in which they are declared in the designer code.
Re: [2005] Question about looping through controls
thanks for the responses...
They're static controls so I had to change the order of the .add method for each of the controls in the designer code.