protected override void CreateChildControls()
{
var 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] = "0";
var row = new TableRow();
var cell = new TableCell();
table.Rows.Add(row);
row.Cells.Add(cell);
if(MethodButton != null)
cell.Controls.Add(MethodButton);
row = new TableRow();
cell = new TableCell();
table.Rows.Add(row);
row.Cells.Add(cell);
ColorDiv = new DesignModeBoxButton();
ColorDiv.CssClass = String.Empty;
ColorDiv.Style[HtmlTextWriterStyle.Margin] = "0";
ColorDiv.Style[HtmlTextWriterStyle.Padding] = "0";
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();
}