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);
        }
Пример #2
0
        public override CellEditable StartEditing(Gdk.Event ev, Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags)
        {
            if (property == null || editorCell == null || !sensitive)
            {
                return(null);
            }

            StateType   state   = GetState(flags);
            EditSession session = editorCell.StartEditing(cell_area, state);

            if (session == null)
            {
                return(null);
            }
            Gtk.Widget propEditor = (Gtk.Widget)session.Editor;
            propEditor.Show();
            HackEntry e = new HackEntry(propEditor, session);

            e.Show();
            return(e);
        }