protected override void CreateChildControls() { Table table = new Table(); table.Attributes.Add("border", "0"); table.Attributes.Add("cellspacing", "0"); table.Attributes.Add("cellpadding", "0"); table.Style[HtmlTextWriterStyle.Margin] = "1px"; table.Style[HtmlTextWriterStyle.Padding] = "0px"; TableRow row = new TableRow(); TableCell cell = new TableCell(); table.Rows.Add(row); row.Cells.Add(cell); if (this.MethodButton != null) { cell.Controls.Add(this.MethodButton); } row = new TableRow(); cell = new TableCell(); table.Rows.Add(row); row.Cells.Add(cell); ColorDiv = new DesignModeBoxButton(); ColorDiv.CssClass = ""; ColorDiv.Style[HtmlTextWriterStyle.Margin] = "0px"; ColorDiv.Style[HtmlTextWriterStyle.Padding] = "0px"; ColorDiv.Width = new Unit(21, UnitType.Pixel); ColorDiv.Height = new Unit(5, UnitType.Pixel); ColorDiv.Style["background-color"] = DefaultColor; ColorDiv.Style["font-size"] = "1px"; cell.Controls.Add(ColorDiv); Content.Add(table); base.CreateChildControls(); }
protected override void CreateChildControls() { Table table = new Table(); table.Attributes.Add("border", "0"); table.Attributes.Add("cellspacing", "0"); table.Attributes.Add("cellpadding", "0"); table.Style[HtmlTextWriterStyle.Margin] = "1px"; table.Style[HtmlTextWriterStyle.Padding] = "0px"; TableRow row = new TableRow(); TableCell cell = new TableCell(); table.Rows.Add(row); row.Cells.Add(cell); if (this.MethodButton != null) { cell.Controls.Add(this.MethodButton); } row = new TableRow(); cell = new TableCell(); table.Rows.Add(row); row.Cells.Add(cell); ColorDiv = new DesignModeBoxButton(); ColorDiv.CssClass = ""; ColorDiv.Style[HtmlTextWriterStyle.Margin] = "0px"; ColorDiv.Style[HtmlTextWriterStyle.Padding] = "0px"; ColorDiv.Width = new Unit(21, UnitType.Pixel); ColorDiv.Height = new Unit(5, UnitType.Pixel); ColorDiv.Style["background-color"] = DefaultColor; ColorDiv.Style["font-size"] = "1px"; cell.Controls.Add(ColorDiv); Content.Add(table); base.CreateChildControls(); }