Results 1 to 8 of 8

Thread: Property problems... (Resolved)

Threaded View

  1. #1

    Thread Starter
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840

    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
    Last edited by pax; Apr 26th, 2004 at 04:38 AM.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width