PDA

View Full Version : Relocate multiple controls (VB6)


birdie_nam_nam
03-26-04, 01:59 AM
Hello, dear friends!

I have a form. In the top part of the form there are a number of controls. These top controls can be shown/hidden by the user (in a menu).

Below the optional controls there are many more controls. If the user choses to hide the top control, I want all the other controls to move up so they fill the form anyway.

My question is, is there any shortcut to do this. Can I collect them in some kind of collection, and move them all simultaniosly, or must i write .top= for each and every control?

Best regards, Sebastian.

hyjacked
04-13-04, 12:48 PM
I would suggest putting them on a panel or similar object. that way you only have to move the panel around, rather than than every element.

A group box might also work, but you may not want the border.

birdie_nam_nam
04-14-04, 01:19 AM
Thanks!

A frame with the frame invisible worked out fine for me.

/Sebastian.