×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    95

    Adding /n in tbuf

    Hi

    I am Newbie to symbian

    I want to add "\n" to TBuf

    I have written the following code for it

    TBuf<50> finalBuffer;
    finalBuffer.Append(number);
    finalBuffer.Append(_L("\n"));
    finalBuffer.Append(_L("Message:"));
    finalBuffer.Append(message);

    But No success any clue??

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

    Re: Adding /n in tbuf

    Your new line character is there, do not worry. However it matters what you do with finalBuffer afterwards. CGraphicsContext:rawText will draw you a box for example. Various editors will treat it as a space (they use Unicode break characters, some of them are named at the end of CEditableText, like CEditableText::ELineBreak).

  3. #3
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    95

    Re: Adding /n in tbuf

    Hi ...

    Thanks for the reply I am inserting the finalbuffer text in the CEikEdwin control using SetText Api but I am not able to see the effect of \n...

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

    Re: Adding /n in tbuf

    For CEikEdwin, the remark about special characters apply.
    Use finalBuffer.Append(CEditableText::ELineBreak).

  5. #5
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    95

    Re: Adding /n in tbuf

    Thank you for your reply....

    I added \f instead of \n and problem got solved....

Similar Threads

  1. help needed for using TBuf
    By jcrajan00 in forum Symbian
    Replies: 8
    Last Post: 2010-03-24, 07:30
  2. Replies: 17
    Last Post: 2009-08-06, 15:16
  3. preverify error. PLZ HELP
    By michaelhann89 in forum Mobile Java Tools & SDKs
    Replies: 14
    Last Post: 2007-03-22, 22:51
  4. Tbuf Usage: Inside Headerfile Class
    By Alicia_S60 in forum Symbian
    Replies: 2
    Last Post: 2004-12-01, 04:19

Posting Permissions

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