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?

Gbps
  • 857
  • 2
  • 14
  • 29

1 Answers1

1

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
  • 922,412
  • 146
  • 1,693
  • 2,536
  • 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 May 24 '10 at 17:59