×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    46

    new line in text editor

    Hello guys

    How to insert a new line in a text editor ?

    i tried adding \n and \r\n but none of them worked.

    i am trying to display something like :

    _LIT(Ktext, "new line \n"), i also tried _LIT(Ktext, "new line \r\n"),


    Many thanks !

    hako

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: new line in text editor

    ASCII control characters do not work for some reason, you have to use the Unicode ones. Since no one knows them really, CEditableText contains a related enumeration (CEditableText::ELineBreak is what you need in this particular case).

  3. #3
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    119

    Re: new line in text editor

    Use:

    Code:
    TChar newLineChar(8233);

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: new line in text editor

    Thank you Alav, proposing a magic number was really important. You could have written EParagraphDelimiter at least.

  5. #5
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    119

    Re: new line in text editor

    At least there will now be *some* poeple who know at least *one* of these magic codes.

  6. #6
    Super Contributor
    Join Date
    Jul 2007
    Location
    Beijing, China
    Posts
    538

    Re: new line in text editor

    “\f” may work

Similar Threads

  1. Text editor & Form line expand
    By tektronic in forum Symbian
    Replies: 4
    Last Post: 2009-05-24, 08:39
  2. Error while making sis file
    By lalitjadiya in forum Symbian
    Replies: 9
    Last Post: 2008-05-20, 17:18
  3. carbide build problem help please
    By berkcekisbas in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-09-26, 19:41
  4. My BuilderX (with S60 SDK 2.1.NET MS version) cannot build ARMI UREL
    By danielvidonyi@hotmail.com in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-05-04, 21:30

Posting Permissions

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