CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    13

    Panel resizing wgen its form resizes

    I have a Form with a Panel which just fits on which I use to draw graphics. How can this panel be made to resize when one resizes the Form.?

  2. #2
    Join Date
    Oct 2004
    Location
    Rocket City
    Posts
    220

    Re: Panel resizing wgen its form resizes

    You should make an effort to look through the methods and properties available for Panel. If your panel will always 'just fit' it is really simple - just set the Panel.Dock propery to Fill. If there are other things going in the Form then you could create the Form.SizeChanged event handler (or ClientSizeChanged) and adjust the size of your Panel accordingly in code. (SizeChanged is sometimes preferable to Resize since, for example, clicking the Maximize button fails to trigger the Resize event.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured