[Mono-bugs] [Bug 420312] ToolStripCollectionEditor implementation

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Feb 24 18:34:32 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=420312

User contact at i-nz.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=420312#c5





--- Comment #5 from Ivan Zlatev <contact at i-nz.net>  2009-02-24 16:34:30 MST ---
What the ToolStripCollectionEditor should do IMHO is

1) Use reflection to find all classes that are:
      - subclasses of ToolStripItem
      - in a public assembly and are public classes
2) Based on the ToolStripItemDesignerAvailability attribute on each of the
ToolStripItem filter out all that do not match the ((ToolStripItem)
ITypeDescriptorContext.Instance).Owner type.

Now the problem is that ITypeDescriptorContext is not known - not until
EditValue is called, so overriding CreateNewItemTypes won't work because it is
called prior EditValue. You will have to create a new custom
CollectionEditor.CollectionForm where you will be able to override
ShowEditorDialog, because at this stage you will be able to access the Context
property of the CollectionForm and do what I explained above to populate some
sort of a list of allowed toolstrip items to create.

That way the editor won't have any hardcoded values.

Also tests won't be required (won't be possible anyway) when the editor is
implemented that way.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list