Prev | Current Page 580 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

DisplayMode.Name));
displayModeDropDown.SelectedIndex = selectedIndex;
}
public override ControlCollection Controls
{
get
{
EnsureChildControls();
return base.Controls;
}
}
public override Unit Height
{
460 CHAPTER 10 ?–  OTHER SERVER CONTROLS
get
{
return base.Height;
}
set
{
EnsureChildControls();
Unit min = new Unit(87);
if (value.Value > min.Value)
base.Height = value;
else
base.Height = min;
}
}
public override Unit Width
{
get
{
return base.Width;
}
set
{
EnsureChildControls();
Unit min = new Unit(167);
if (value.Value >= min.Value)
base.Width = value;
else
base.Width = min;
}
}
protected override void CreateChildControls()
{
Controls.Clear();
CreateChildControlHierarchy();
}
#endregion
private void CreateChildControlHierarchy()
{
Panel rootPanel = new Panel
{
ID = "rootPanel",
BorderWidth = 1,
BackColor = this.BackColor,
CHAPTER 10 ?–  OTHER S ERVER C ONTROLS 461
ForeColor = this.ForeColor
};
rootPanel.Font.Names = new string[] { "Verdana", "Arial", "Sans Serif" };
rootPanel.Width = this.Width;
rootPanel.Height = this.Height;
Controls.Add(rootPanel);
displayModeDropDown = new DropDownList
{
ID = "displayModeDropDown",
AutoPostBack = true,
Width = 120
};
displayModeDropDown.


Pages:
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592