-
July 9th, 2009, 02:47 AM
#1
[RESOLVED] User-resizable container
Hi all,
I've been googling for a while but I've come up empty-handed. I need a container-control not unlike the GroupBox, but one that allows the user to resize it at runtime.
Does anyone know of a control that can do this / how to configure a control to allow it?
Thanks
It's not a bug, it's a feature!
-
July 9th, 2009, 10:43 AM
#2
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.
-
July 10th, 2009, 01:46 AM
#3
Re: User-resizable container
Originally Posted by MadHatter
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;
}
}
}
I love you I love you I love you I love you I love you
Excellent stuff mate! It does pretty much exactly what I want
It's not a bug, it's a feature!
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|