public IPropertyEditor CreateEditor(PropertyDescriptor prop) { PropertyEditorCell cell = PropertyEditorCell.GetPropertyCell(prop); cell.Initialize(this, prop, null); session = cell.StartEditing(new Gdk.Rectangle(), StateType.Normal); if (session == null) { return(new DummyEditor()); } Gtk.Widget w = (Gtk.Widget)session.Editor as Gtk.Widget; w.ShowAll(); return(session.Editor); }
void PropertyData(Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter) { CellRendererProperty rc = (CellRendererProperty)cell; bool group = (bool)model.GetValue(iter, 2); if (group) { rc.SetData(null, null, null); } else { PropertyDescriptor prop = (PropertyDescriptor)model.GetValue(iter, 1); PropertyEditorCell propCell = PropertyEditorCell.GetPropertyCell(prop); InstanceData idata = (InstanceData)model.GetValue(iter, 3); propCell.Initialize(tree, prop, idata.Instance); rc.SetData(idata.Instance, prop, propCell); } }