AspNetEdit.UI.PropertyEditors.EnumEditor.GetEditWidget C# (CSharp) Метод

GetEditWidget() публичный Метод

public GetEditWidget ( ) : Gtk.Widget
Результат Gtk.Widget
        public override Gtk.Widget GetEditWidget()
        {
            namestore = new ListStore (typeof(string));
            ComboBox combo = new ComboBox (namestore);
            CellRenderer rdr = new CellRendererText ();
            combo.PackStart (rdr, true);
            combo.AddAttribute (rdr, "text", 0);

            Array values = System.Enum.GetValues (parentRow.PropertyDescriptor.PropertyType);

            foreach (object s in values) {
                string str = parentRow.PropertyDescriptor.Converter.ConvertToString (s);
                TreeIter t = namestore.AppendValues (str);
                if (str == parentRow.PropertyDescriptor.Converter.ConvertToString (parentRow.PropertyValue))
                    combo.SetActiveIter (t);
            }

            combo.Changed += new EventHandler (combo_Changed);
            combo.Destroyed += new EventHandler (combo_Destroyed);
            return combo;
        }