SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Text Property of the #TextEditor control not persisted, easy fix

Last post 10-27-2006 3:54 PM by MarkusPalme. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-27-2006 3:17 PM

    Text Property of the #TextEditor control not persisted, easy fix

    Hi,

    Using build 1945.

    I'm using the #Develop TextEditor control in a C# project. When I drop the control on a WinForm and set the Text property it gets set at design time OK. However, when I run the code the Text property is not passed to the run time instance and the text area is thus blank. Also if I close the solution and open it again the Text property value is blank again.

    Fix is to add:

    [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]

    just before the declaration "public override string Text" in TextEditorControlBase.cs

    thus becoming:

    thus becoming:

    [Browsable(true)]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
    public override string Text {
     get {
      return Document.TextContent;
     }
     set {
      Document.TextContent = value;
     }
    }

    regards,

    DAN

     

    Filed under: ,
  • 10-27-2006 3:54 PM In reply to

    • MarkusPalme
    • Top 25 Contributor
    • Joined on 09-06-2005
    • Schwabmünchen, Germany
    • Posts 90
    • Team Members

    Re: Text Property of the #TextEditor control not persisted, easy fix

    Thanks, I have committed your patch.
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.