J
Jeremy Chapman
My user control has a button and a panel on it. I want the panel to size to
whatever size the control width and height properties dictate. how do I do
that?
So far this is what I have:
protected override void CreateChildControls()
{
base.CreateChildControls();
if (pPanel_m == null)
{
pPanel_m = new Panel();
pPanel_m.Width = this.Width;
pPanel_m.Height = this.Height;
pPanel_m.BorderWidth = 1;
pPanel_m.BorderColor = System.Drawing.Color.Black;
Controls.Add(pPanel_m);
}
}
this seems to work when viewed in the page, but I see nothing in the
designer. what other methods do I need to override?
whatever size the control width and height properties dictate. how do I do
that?
So far this is what I have:
protected override void CreateChildControls()
{
base.CreateChildControls();
if (pPanel_m == null)
{
pPanel_m = new Panel();
pPanel_m.Width = this.Width;
pPanel_m.Height = this.Height;
pPanel_m.BorderWidth = 1;
pPanel_m.BorderColor = System.Drawing.Color.Black;
Controls.Add(pPanel_m);
}
}
this seems to work when viewed in the page, but I see nothing in the
designer. what other methods do I need to override?