> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:mono- > [EMAIL PROTECTED] On Behalf Of Mike Deskevich > Sent: domingo, 24 de junio de 2007 21:02 > To: [email protected] > Subject: [Mono-winforms-list] Using PropertyGrid with UITypeEditor > > I'm having a problem that I can't seem to figure out. I created a > class that has a public property with an array of enums. I would like > to have an Editor that allows the user select 0 or more enums to > populate this array. My problem is that the PropertyGrid won't > display either the elipses or the dropdown button for me. > > Below is an example of the how I have the classes set up. When i > create a PropertyGrid and set the SelectedObject to an instance of > ClassToEdit all the properties show up how they're supposed to except > for the array of MyEnum. > > Any hints? I've looked through the MSDN and it looks like I'm > implementing this just like all of the examples. >
This looks like a bug, please file a report here: http://bugzilla.ximian.com Rolf > public class ClassToEdit > { > //didn't copy the other simple properties here > > //here's my custom type > MyEnum[] m_enums; > [Editor(typeof(MyEnumArrayEditor),typeof(UITypeEditor))] > property MyEnum[] enums > { > get > { > return m_enums; > } > set > { > m_enums=value; > } > } > } > > public class MyEnumArrayEdior : UITypeEditor > { > private IWindowsFormsEditorService edSvc; > > public override UITypeEditorEditStyle > GetEditStyle(ITypeDescriptorContext context) > { > return UITypeEditorEditStyle.DropDown; > } > > public override Object EditValue(ITypeDescriptorContext context, > IServiceProvider provider, Object value) > { > //populate the combo box and stuff here > } > } > _______________________________________________ > Mono-winforms-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-winforms-list > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.476 / Virus Database: 269.10.0/887 - Release Date: > 05/07/2007 13:55 _______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
