Reposition components proportionally on a form
Posted on 2004-10-07
I am sure this is a simple question, but I haven't found an answer that works, yet.
As an example of what I need, let's say that I have a form with two rows of five buttons on it. The buttons in each row are placed next to each other horizontally, spaced equally. The two rows are spaced equally apart vertically. When the user expands or contracts the form, I want the buttons to reposition themselves, keeping their proportional, equal spacing on the form.
Preferably, I would be able to do this with anchor, alignment magic as I my real project has many controls on several group boxes in a client aligned page control/tab sheet.
If I can't do this easily (anchor, alignment magic) then, I will up the points to 500 for the person who provides a function that will:
1. Go through the controls on the tab sheet and re-size the group boxes proportionally on the form.
2. Reposition the controls on each group box proportionally to the size of the group box.