vb.net - how do I control the order of child controls when adding to my parent control? -


i have panel (call main_box) , add 20 more panels inside of it. each of child panels placed right under 1 above it. when resize form, child panels change size (like want them to), don't reposition inside parent box, need manually.

i trying:

dim vert_pos integer = 0 each o object in main_box.controls     o.location = new point(0, vert_pos)     vert_pos += o.height next 

but child boxes positioned out of order. not appear in same order added them parent box.

how can ensure repositioned in order?

what ended doing creating array; , each time added child panel main_box, added array. iterate through array instead of main_box.controls , order stays correct.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -