When my form re-sizes I would like a text box that I have to grow up to the size of the group box that it is in but leave some room for a command button to the right of the text box. Currently I am using the following code.
Anchor the textbox "right" along witht he 2 you have specified. Since you want it to grow in all directions, it'll be aware of the relationship to the width of its parent also.
Since I had your attention, I thought I would add another text box in between the button and the first text box to see what would happen. Unfortunately the boxes ended up on top of each other. In my first example the textbox1 was able to right anchor to the button which it is still doing. textbox2 is also anchoring to the button. Is there a way to get textbox1 to anchor to textbox2 and textbox2 to anchor to the button?
Obviously the more complicated the form gets the docking and anchor features of the components will only get you so far and then you are going to need to start coding.
I will take a look at trying to determine how much the form was scaled up or down and the adjust my controls accordingly. However I do not think it will work that well since some of my components will not be changing sizes, like the button. So the scale factor will not be exactly the same.