Mark
2008-08-14 19:36:09 UTC
Hi...
Sorry for the newbie questions but I've inherited a .net-written windows
form app with a bunch of controls on it. A request came in to
1) make the form resizable
2) make the select boxes automatically resize with the box.
I found some posts online about adding panels and setting the anchors
"properly", so I've been experimenting but it's just a mess.
I got 2 drop-downs and a button on one panel that doesn't need a whole lot
of resizing. Under that, I have another panel one multi-select box and 6
buttons vertically next to it. Under that, I have another panel with a
multi-select box and 2 buttons. That panel is sometimes shown, sometimes not.
When the form has FormBorderStyle=Sizable, I can resize the form but none of
the controls/panels resize. When the form has AutoSize=true, things start
getting weird. I can pull the grow handle, but it always snaps back to the
original size.
As I've fiddled with Docking and Anchors on the various panels, I've gotten
all kinds of bizarre behavior but nothing approximating a smooth behavior.
What are the tricks I'm missing?
Thanks
Mark
Sorry for the newbie questions but I've inherited a .net-written windows
form app with a bunch of controls on it. A request came in to
1) make the form resizable
2) make the select boxes automatically resize with the box.
I found some posts online about adding panels and setting the anchors
"properly", so I've been experimenting but it's just a mess.
I got 2 drop-downs and a button on one panel that doesn't need a whole lot
of resizing. Under that, I have another panel one multi-select box and 6
buttons vertically next to it. Under that, I have another panel with a
multi-select box and 2 buttons. That panel is sometimes shown, sometimes not.
When the form has FormBorderStyle=Sizable, I can resize the form but none of
the controls/panels resize. When the form has AutoSize=true, things start
getting weird. I can pull the grow handle, but it always snaps back to the
original size.
As I've fiddled with Docking and Anchors on the various panels, I've gotten
all kinds of bizarre behavior but nothing approximating a smooth behavior.
What are the tricks I'm missing?
Thanks
Mark