Groups | Blog | Home
all groups > dotnet windows forms designtime > june 2005 >

dotnet windows forms designtime : Design-time resize event on UserControl?


webstuff NO[at]SPAM urbanperspective.net
6/6/2005 7:17:41 AM
Hi,

I have a UserControl with another control embedded on it and want to
resize this embedded control whenever the developer resizes the
UserControl at design time. Is there any way of doing this?

Cheers,
Rich
Tim Wilson
6/6/2005 10:27:17 AM
You can use the Dock or Anchor properties of the embedded control, or, if
the resizing needs are a little more complicated, you can override the
OnResize method of the UserControl and adjust the embedded controls size
from within that method.

--
Tim Wilson
..Net Compact Framework MVP

[quoted text, click to view]

joeycalisay
6/7/2005 4:13:50 AM
or if you don't want to use Dock and Anchor you can provide your own
layout routine on the OnLayout method of your UserControl...
AddThis Social Bookmark Button