resizing usercontrol

J

Jeff

..NET 2.0

I've added a custom UserControl onto a form. When I resize the form the
UserControl doesn't resize. What property do I need to set on the
UserControl so it automatically resizes if the window it's placed on
resizes?

Jeff
 
A

Alberto Poblacion

Jeff said:
I've added a custom UserControl onto a form. When I resize the form the
UserControl doesn't resize. What property do I need to set on the
UserControl so it automatically resizes if the window it's placed on
resizes?

You can use either the Anchor or Dock properties of your control to
"attach" it to the edges of its container, so it will resize when the
container is resized. Note that you will only see a visible effect if the
controls inside your user control are also Anchored to the edges of the user
control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top