CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #2
    Join Date
    Mar 2004
    Location
    33°11'18.10"N 96°45'20.28"W
    Posts
    1,808

    Re: User-resizable container

    I saw the suggestion on the other forum, but this one has formatting, so...

    at a minimum you could set the sizebox style for a panel (though it gives a raised 3d border) which will allow the control to be sized by a user:

    Code:
    public class SizeablePanel : ContainerControl {
        const int WS_SIZEBOX = 0x00040000;
        protected override CreateParams CreateParams {
            get {
                CreateParams cp = base.CreateParams;
                cp.Style |= WS_SIZEBOX;
                return cp;
            }
        }
    }
    Last edited by MadHatter; July 9th, 2009 at 10:49 AM.

Tags for this Thread

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