Using InputString with #13#10 adds an extra line

  • If I use InputString with a CRLF (#13#10), my lines get displayed with an extra line feed.

    For example

    Code
    WPRichText1.InputString('LINE1' + #13#10 + 'LINE2' + #13#10 + 'LINE3' + #13#10);

    get's displayed as

    Code
    LINE1LINE2LINE3

    instead of

    Code
    LINE1
    LINE2
    LINE3

    Since the plain text that I want to display comes from a database and that plain text uses the DOS format for CRLF, my text get's displayed with an extra line feed.

    Is there a property in WPTools 5 that will allow me to have CRLF (#13#10) display as a single line feed and not a double line feed.

    Of course only using #13 works, but since my text in the database is already formated using #13#10 I don't want to parse all #13#10 and replace them with #13.

    Thanks,


    Michel W.

    • Offizieller Beitrag

    InputString is not intended to be used to load text from a database. actually keyboard typing whioch makes #13 and carriage return and #10 a new line (shift carriage return).

    You can load your text by assigning it to property AsString.

    If the format is not detected automatically set the TextLoadFromat property to 'ANSI'

    Julian