Widget CreateInnerExceptionsTree() { InnerExceptionsTreeView = new InnerExceptionsTree(); InnerExceptionsTreeView.ModifyBase(StateType.Normal, Styles.ExceptionCaughtDialog.TreeBackgroundColor.ToGdkColor()); // background InnerExceptionsTreeView.ModifyBase(StateType.Selected, Styles.ExceptionCaughtDialog.TreeSelectedBackgroundColor.ToGdkColor()); // selected InnerExceptionsTreeView.HeadersVisible = false; InnerExceptionsStore = new TreeStore(typeof(ExceptionInfo)); FillInnerExceptionsStore(InnerExceptionsStore, exception); InnerExceptionsTreeView.AppendColumn("Exception", new CellRendererInnerException(), new TreeCellDataFunc((tree_column, cell, tree_model, iter) => { var c = (CellRendererInnerException)cell; c.Text = ((ExceptionInfo)tree_model.GetValue(iter, 0)).Type; })); InnerExceptionsTreeView.ShowExpanders = false; InnerExceptionsTreeView.LevelIndentation = 10; InnerExceptionsTreeView.Model = InnerExceptionsStore; InnerExceptionsTreeView.ExpandAll(); InnerExceptionsTreeView.Selection.Changed += (sender, e) => { TreeIter selectedIter; if (InnerExceptionsTreeView.Selection.GetSelected(out selectedIter)) { UpdateSelectedException((ExceptionInfo)InnerExceptionsTreeView.Model.GetValue(selectedIter, 0)); } }; var eventBox = new EventBox(); eventBox.ModifyBg(StateType.Normal, Styles.ExceptionCaughtDialog.TreeBackgroundColor.ToGdkColor()); // top and bottom padders var vbox = new VBox(); vbox.PackStart(InnerExceptionsTreeView, true, true, 12); eventBox.Add(vbox); eventBox.ShowAll(); return(eventBox); }
Widget CreateInnerExceptionsTree() { innerExceptionsTreeView = new InnerExceptionsTree(); innerExceptionsTreeView.ModifyBase(StateType.Normal, Styles.ExceptionCaughtDialog.TreeBackgroundColor.ToGdkColor()); // background innerExceptionsTreeView.ModifyBase(StateType.Selected, Styles.ExceptionCaughtDialog.TreeSelectedBackgroundColor.ToGdkColor()); // selected innerExceptionsTreeView.HeadersVisible = false; innerExceptionsStore = new TreeStore(typeof(ExceptionInfo)); FillInnerExceptionsStore(innerExceptionsStore, exception); innerExceptionsTreeView.AppendColumn("Exception", new CellRendererInnerException(), new TreeCellDataFunc((tree_column, cell, tree_model, iter) => { var c = (CellRendererInnerException)cell; c.Text = ((ExceptionInfo)tree_model.GetValue(iter, 0)).Type; })); innerExceptionsTreeView.ShowExpanders = false; innerExceptionsTreeView.LevelIndentation = 10; innerExceptionsTreeView.Model = innerExceptionsStore; innerExceptionsTreeView.ExpandAll(); innerExceptionsTreeView.Selection.Changed += (sender, e) => { TreeIter selectedIter; if (innerExceptionsTreeView.Selection.GetSelected(out selectedIter)) { UpdateSelectedException((ExceptionInfo)innerExceptionsTreeView.Model.GetValue(selectedIter, 0)); } }; innerExceptionsTreeView.SetCommonAccessibilityAttributes( "ExceptionCaughtDialog.InnerExceptionsTreeView", GettextCatalog.GetString("Inner Exceptions"), null); var eventBox = new EventBox(); eventBox.ModifyBg(StateType.Normal, Styles.ExceptionCaughtDialog.TreeBackgroundColor.ToGdkColor()); // top and bottom padders var vbox = new VBox(); var scroll = new ScrolledWindow(); scroll.WidthRequest = 200; scroll.Child = innerExceptionsTreeView; vbox.PackStart(scroll, true, true, 12); eventBox.Add(vbox); eventBox.ShowAll(); return(eventBox); }
Widget CreateInnerExceptionsTree () { InnerExceptionsTreeView = new InnerExceptionsTree (); InnerExceptionsTreeView.ModifyBase (StateType.Normal, Styles.ExceptionCaughtDialog.TreeBackgroundColor.ToGdkColor ()); // background InnerExceptionsTreeView.ModifyBase (StateType.Selected, Styles.ExceptionCaughtDialog.TreeSelectedBackgroundColor.ToGdkColor ()); // selected InnerExceptionsTreeView.HeadersVisible = false; InnerExceptionsStore = new TreeStore (typeof (ExceptionInfo)); FillInnerExceptionsStore (InnerExceptionsStore, exception); InnerExceptionsTreeView.AppendColumn ("Exception", new CellRendererInnerException (), new TreeCellDataFunc ((tree_column, cell, tree_model, iter) => { var c = (CellRendererInnerException)cell; c.Text = ((ExceptionInfo)tree_model.GetValue (iter, 0)).Type; })); InnerExceptionsTreeView.ShowExpanders = false; InnerExceptionsTreeView.LevelIndentation = 10; InnerExceptionsTreeView.Model = InnerExceptionsStore; InnerExceptionsTreeView.ExpandAll (); InnerExceptionsTreeView.Selection.Changed += (sender, e) => { TreeIter selectedIter; if (InnerExceptionsTreeView.Selection.GetSelected (out selectedIter)) { UpdateSelectedException ((ExceptionInfo)InnerExceptionsTreeView.Model.GetValue (selectedIter, 0)); } }; var eventBox = new EventBox (); eventBox.ModifyBg (StateType.Normal, Styles.ExceptionCaughtDialog.TreeBackgroundColor.ToGdkColor ()); // top and bottom padders var vbox = new VBox (); vbox.PackStart (InnerExceptionsTreeView, true, true, 12); eventBox.Add (vbox); eventBox.ShowAll (); return eventBox; }