[Mono-bugs] [Bug 82070][Wis] New - PropertyGrid with UITypeEditor not showing dropdown
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Jul 11 12:01:31 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by mikedeskevich at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=82070
--- shadow/82070 2007-07-11 12:01:31.000000000 -0400
+++ shadow/82070.tmp.23447 2007-07-11 12:01:31.000000000 -0400
@@ -0,0 +1,76 @@
+Bug#: 82070
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Latest Ubuntu with all patches
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com
+ReportedBy: mikedeskevich at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: PropertyGrid with UITypeEditor not showing dropdown
+
+I first reported this bug on the mono mailing lists. It was deemed a bug,
+so I'm just going to paste the email here so that you have it for your records:
+
+> 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
+> }
+> }
More information about the mono-bugs
mailing list