[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 :)
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;
}
}
}
Re: User-resizable container
Quote:
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 :D
Excellent stuff mate! It does pretty much exactly what I want :thumb: