views:

45

answers:

1

I have the following property:

[Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), CategoryAttribute("Lua Attributes"), DescriptionAttribute("The function to be run when the enter button is pressed")]
    public string OnEnter {
        get { return onEnterFunc; }
        set { onEnterFunc = value; }
    }

That should be activating the MultilineStringEditor as the main editor for that property in my property window. Unfortunately, the editor for OnEnter, when loaded into the property window, is just a simple string editor. How can I make .NET recognize that OnEnter should be a mutliline edited property?

A: 

No, that's definitely a multi-line string editor. Don't forget to click the dropdown arrow on the edit box to invoke the editor. You have to press Ctrl+Enter to get it to close the window. If you don't like the way it works then you can create your own by deriving from the UITypeEditor class.

Hans Passant
Oh, I see. I was assuming this editor was like the StringCollectionEditor that had a popup with a textbox to use as an input. Thanks!
Gbps