protected override void CreateChildControls() { BottomToolbar.Buttons.Clear(); FillBottomToolbar(); if (BottomToolbar.Buttons.Count == 0) { if (EditPanel.Toolbars.Contains(BottomToolbar)) { EditPanel.Toolbars.Remove(BottomToolbar); } _bottomToolbarRow.Visible = false; (EditPanel.Parent as TableCell).Style["border-bottom-width"] = "0px"; } else { BottomToolbar.AlwaysVisible = true; BottomToolbar.ButtonImagesFolder = this.ButtonImagesFolder; for (int i = 0; i < BottomToolbar.Buttons.Count; i++) { BottomToolbar.Buttons[i].IgnoreTab = this.IgnoreTab; } } TopToolbar.Buttons.Clear(); FillTopToolbar(); if (TopToolbar.Buttons.Count == 0) { if (EditPanel.Toolbars.Contains(TopToolbar)) { EditPanel.Toolbars.Remove(TopToolbar); } _topToolbarRow.Visible = false; (EditPanel.Parent as TableCell).Style["border-top-width"] = "0px"; _changingToolbar = null; } else { TopToolbar.ButtonImagesFolder = this.ButtonImagesFolder; for (int i = 0; i < TopToolbar.Buttons.Count; i++) { TopToolbar.Buttons[i].IgnoreTab = this.IgnoreTab; TopToolbar.Buttons[i].PreservePlace = this.TopToolbarPreservePlace; } } if (!Height.IsEmpty) { (Controls[0] as Table).Style.Add(HtmlTextWriterStyle.Height, Height.ToString()); } if (!Width.IsEmpty) { (Controls[0] as Table).Style.Add(HtmlTextWriterStyle.Width, Width.ToString()); } if (EditPanel.IE(Page) && !IsDesign) { _editPanelCell.Style[HtmlTextWriterStyle.Height] = "expression(Sys.Extended.UI.HTMLEditor.Editor.MidleCellHeightForIE(this.parentNode.parentNode.parentNode,this.parentNode))"; } EditPanel.IgnoreTab = this.IgnoreTab; }
protected override void OnInit(EventArgs e) { base.OnInit(e); Attributes.Add("name", ClientID); Attributes.Add("marginheight", "0"); Attributes.Add("marginwidth", "0"); Attributes.Add("frameborder", "0"); if (EditPanel.IE(Page)) { Attributes.Add("src", "javascript:false;"); } Style.Add(HtmlTextWriterStyle.BorderWidth, Unit.Pixel(0).ToString()); }