D
Daniele Fornaciari
Hi,
I'm writing a particular Control.
Name: PanelTiteled
Derived from: Panel
Use a particular control: PanelGradientText (A panel with a background
gradit and a text).
In PanelTiteled PanelGradientText has Dock = DockStyle.Top
When in main application I use PanelTiteled and I add a control like
GroupBox to this object with Dock = DockStyle.Fill a part of this going
under PanelGradientText and I cannot to see it.
I think this is produced by the order in which I add Control to
PanelTiteled.Controls. So I write this code:
PanelTiteled plCenter = new PanelTiteled();
GropBox gb = new GropBox();
gb.Dock = System.Windows.Forms.DockStyle.Fill;
plCenter.Controls.Add(gb);
//.............................................
foreach (System.Windows.Forms.Control c in plCenter)
{
plCenter.Remove(c);
plCenter.Add(c);
}
And So I can See correct, but I think this isn't a good code.
Someone can help me?
Thanks.
Daniele
I'm writing a particular Control.
Name: PanelTiteled
Derived from: Panel
Use a particular control: PanelGradientText (A panel with a background
gradit and a text).
In PanelTiteled PanelGradientText has Dock = DockStyle.Top
When in main application I use PanelTiteled and I add a control like
GroupBox to this object with Dock = DockStyle.Fill a part of this going
under PanelGradientText and I cannot to see it.
I think this is produced by the order in which I add Control to
PanelTiteled.Controls. So I write this code:
PanelTiteled plCenter = new PanelTiteled();
GropBox gb = new GropBox();
gb.Dock = System.Windows.Forms.DockStyle.Fill;
plCenter.Controls.Add(gb);
//.............................................
foreach (System.Windows.Forms.Control c in plCenter)
{
plCenter.Remove(c);
plCenter.Add(c);
}
And So I can See correct, but I think this isn't a good code.
Someone can help me?
Thanks.
Daniele