internal PropertyGrid(EditorManager editorManager) : base(false, 0) { this.editorManager = editorManager; tips = new Tooltips(); #region Toolbar toolbar = new Toolbar(); toolbar.ToolbarStyle = ToolbarStyle.Icons; toolbar.IconSize = IconSize.SmallToolbar; base.PackStart(toolbar, false, false, 0); catButton = new RadioToolButton(new GLib.SList(IntPtr.Zero)); catButton.IconWidget = new Image(new Gdk.Pixbuf(null, "AspNetEdit.UI.PropertyGrid.SortByCat.png")); catButton.SetTooltip(tips, "Sort in categories", null); catButton.Toggled += new EventHandler(toolbarClick); toolbar.Insert(catButton, 0); alphButton = new RadioToolButton(catButton, Stock.SortAscending); alphButton.SetTooltip(tips, "Sort alphabetically", null); alphButton.Clicked += new EventHandler(toolbarClick); toolbar.Insert(alphButton, 1); catButton.Active = true; SeparatorToolItem sep = new SeparatorToolItem(); toolbar.Insert(sep, 2); #endregion vpaned = new VPaned(); descFrame = new Frame(); descFrame.Shadow = ShadowType.In; desc = new VBox(false, 0); descFrame.Add(desc); descTitle = new Label(); descTitle.SetAlignment(0, 0); descTitle.SetPadding(5, 5); descTitle.UseMarkup = true; desc.PackStart(descTitle, false, false, 0); textScroll = new ScrolledWindow(); textScroll.HscrollbarPolicy = PolicyType.Never; textScroll.VscrollbarPolicy = PolicyType.Automatic; desc.PackEnd(textScroll, true, true, 0); //TODO: Use label, but wrapping seems dodgy. descText = new TextView(); descText.WrapMode = WrapMode.Word; descText.WidthRequest = 1; descText.HeightRequest = 100; descText.Editable = false; descText.LeftMargin = 5; descText.RightMargin = 5; textScroll.Add(descText); scrolledWindow = new ScrolledWindow(); scrolledWindow.HscrollbarPolicy = PolicyType.Automatic; scrolledWindow.VscrollbarPolicy = PolicyType.Automatic; vpaned.Pack1(scrolledWindow, true, true); vpaned.Pack2(descFrame, false, true); AddPropertyTab(new DefaultPropertyTab()); AddPropertyTab(new EventPropertyTab()); base.PackEnd(vpaned); Populate(); }
internal PropertyGrid(EditorManager editorManager) : base(false, 0) { this.editorManager = editorManager; tips = new Tooltips (); #region Toolbar toolbar = new Toolbar (); toolbar.ToolbarStyle = ToolbarStyle.Icons; toolbar.IconSize = IconSize.SmallToolbar; base.PackStart (toolbar, false, false, 0); catButton = new RadioToolButton (new GLib.SList (IntPtr.Zero)); catButton.IconWidget = new Image (new Gdk.Pixbuf (null, "AspNetEdit.UI.PropertyGrid.SortByCat.png")); catButton.SetTooltip (tips, "Sort in categories", null); catButton.Toggled += new EventHandler (toolbarClick); toolbar.Insert (catButton, 0); alphButton = new RadioToolButton (catButton, Stock.SortAscending); alphButton.SetTooltip (tips, "Sort alphabetically", null); alphButton.Clicked += new EventHandler (toolbarClick); toolbar.Insert (alphButton, 1); catButton.Active = true; SeparatorToolItem sep = new SeparatorToolItem(); toolbar.Insert (sep, 2); #endregion vpaned = new VPaned (); descFrame = new Frame (); descFrame.Shadow = ShadowType.In; desc = new VBox (false, 0); descFrame.Add (desc); descTitle = new Label (); descTitle.SetAlignment(0, 0); descTitle.SetPadding (5, 5); descTitle.UseMarkup = true; desc.PackStart (descTitle, false, false, 0); textScroll = new ScrolledWindow (); textScroll.HscrollbarPolicy = PolicyType.Never; textScroll.VscrollbarPolicy = PolicyType.Automatic; desc.PackEnd (textScroll, true, true, 0); //TODO: Use label, but wrapping seems dodgy. descText = new TextView (); descText.WrapMode = WrapMode.Word; descText.WidthRequest = 1; descText.HeightRequest = 100; descText.Editable = false; descText.LeftMargin = 5; descText.RightMargin = 5; textScroll.Add (descText); scrolledWindow = new ScrolledWindow (); scrolledWindow.HscrollbarPolicy = PolicyType.Automatic; scrolledWindow.VscrollbarPolicy = PolicyType.Automatic; vpaned.Pack1 (scrolledWindow, true, true); vpaned.Pack2 (descFrame, false, true); AddPropertyTab (new DefaultPropertyTab ()); AddPropertyTab (new EventPropertyTab ()); base.PackEnd (vpaned); Populate (); }