C
CroDude
Hi all!
I've made a custom group-box control derived from a GroupBox. Additionally
I've made a ControlDesigner derived class associated with my group box to
remove some unneeded properties.
But after utilizing this ControlDesigner, I can't parent any control to my
group box in a design view(When not applying ControlDesigner everything
works fine).
Here's the code:
internal class CGroupBoxDesigner : ControlDesigner
{
public CGroupBoxDesigner()
{
}
protected override void PostFilterProperties(IDictionary Properties)
{
Properties.Remove("BackgroundImage");
Properties.Remove("BackColor");
Properties.Remove("FlatStyle");
}
}
and this is how is this ControlDesigner is applied to a group box:
[Designer(typeof(CGroupBoxDesigner)), Description("Custom group-box
control.")]
public class CGroupBox : System.Windows.Forms.GroupBox
{
.......
}
I know that I'm missing something simple here ... Please help.
Thanx!
D.
I've made a custom group-box control derived from a GroupBox. Additionally
I've made a ControlDesigner derived class associated with my group box to
remove some unneeded properties.
But after utilizing this ControlDesigner, I can't parent any control to my
group box in a design view(When not applying ControlDesigner everything
works fine).
Here's the code:
internal class CGroupBoxDesigner : ControlDesigner
{
public CGroupBoxDesigner()
{
}
protected override void PostFilterProperties(IDictionary Properties)
{
Properties.Remove("BackgroundImage");
Properties.Remove("BackColor");
Properties.Remove("FlatStyle");
}
}
and this is how is this ControlDesigner is applied to a group box:
[Designer(typeof(CGroupBoxDesigner)), Description("Custom group-box
control.")]
public class CGroupBox : System.Windows.Forms.GroupBox
{
.......
}
I know that I'm missing something simple here ... Please help.
Thanx!
D.