Property problems... (Resolved)
Hi there.
Straight to the point :
I have created a MustInherit base class that users can inherit from.
In my control I have a property using my baseclass.
In code, it's no problem to set a derived class to the property, but how to do it in the propertygrid?
My property is just greyed out, as if it were readonly.
I mean, if I make a property as Control, the propertgrid automatically let's me select between the controls on the form.
That is basically the functionality I'm looking for.
Here's what I been thinking about doing :
1. Make a custom UITypeEditor.
2. Enum all the derived classes in the project and showing them in a combobox.
3. Then instantiate a new class based on the selection.
So my problems are :
1. How to enumerate derived classes? (I obviously can't know beforehand how many the user creates)
2. How to instantiate a new object, when I only got the type?
3. Does anyone have a better idea on how to do this?
I don't know if this makes any sense at all, but I hope some can help me with this :rolleyes: