Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application layout

Status
Not open for further replies.

Vero

Technical User
Feb 1, 2001
25
IT
I'd like that when I resize my application window, the objects in it moves with it. Can someone tell me how?
Tanks
 
you have to either reset the .top and .left properties or use the .move method of each of the controls. How much you .move the control or what you set the .top and .left too is a matter of the GUI logic you want. ie if you have 2 text boxes beside each other and you resize do the textboxes just share the space equally? Do they have minimum or maximum sizes? Does one of them rubber band? Does one take a larger % of space then the other.

There are many combinations
A good example is the status bar in IE. the first panel rubber bands. The others are fixed size but will reduce to 0 if the window width is small.
Complex forms can have a fair amount of code in the resize event to adjust their size. Then to put more confusion onto it if you have any controls overlaying other controls, like a progress bar in a status bar panel, then you have to know that the status bar, which automatically adjusts itself, doesn't adjust until AFTER the forms resize event fires meaning you have to wait until after the statusbar is done adjusting before you can replace the controls over the panels.

 
In the Form_resize event move each control to a fixed multiple of Me.Width/Screen.width and so on.

You'll need to set minimum screen sizes, you'll need to alter object widths and you'll need to watch out for font sizes

When the Search engine is up do a search for resizing - it's been covered often before


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Thank you all, now I have a good starting point.
Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top