User control

  • Thread starter Thread starter Pesso
  • Start date Start date
Set the Anchor property of the controls you want to resize withing the
parent user control.
 
Hi,
If you want all of your controls to resize you can set their sizes in the
OnSizeChanged method, you should set their sizes to a percentage of the
ClientRectangle, this means that they will always be proportionately the
same.

The problem with using the anchors is that it uses Rectangles so its always
an integer value so you get ugly jerking resizing of your controls, you
should also turn off the SnapToGrid property

Note: You should define where you want them by calculating RectangleF s and
then set the rectangle for each of your controls to one of these
RectangleF's
 
Back
Top