×

Discussion Board

Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30
  1. #16
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Unhappy Re: Adding static Text to a view.. (Information of Application)

    ok.. my prbm is solved..

    but now new problem..

    how to make it readonly... so dat any changes cant b made by user in it??
    i have set ReadONly Flg On but still it is aoolwing me to edit/Delete..

  2. #17
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Smile Re: Adding static Text to a view.. (Information of Application)

    ok ok i got my mistake..

    thanks..

  3. #18
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Adding static Text to a view.. (Information of Application)

    though i have never used Global text editor, i would rather use CeikEdwin in read only mode !
    Amit Kankani
    Nokia Developer Champion

  4. #19
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Adding static Text to a view.. (Information of Application)

    oh... so u have solved ur problem ! i put the post and by that time ur post hadn't reached !
    Amit Kankani
    Nokia Developer Champion

  5. #20
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Smile Re: Adding static Text to a view.. (Information of Application)

    Quote Originally Posted by amitkankani View Post
    oh... so u have solved ur problem ! i put the post and by that time ur post hadn't reached !
    sir but m having some more prbms wid it..
    in buf= "..." , \r\n are not being outputted...
    its not taking new line...
    so i cant use it..

    how can i use Ceikedwin class.. can u give me sm examples..
    i searched Wiki.. but m not getting appropriate guidance..

  6. #21
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Adding static Text to a view.. (Information of Application)

    You can check if CEikEdwin::InsertFromTextFileL solves your problem.
    If you want to insert special characters from code, you should use the anonymous enumeration near to the end of documentation for CEditableText in the SDK Help.

  7. #22
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Adding static Text to a view.. (Information of Application)

    the reason \n\r is not shown is because Symbian new line characters are different... they are as per:

    The new line characters in Symbian are :

    0x2029 - returns char in symbian
    0x2028 - newline in symbian

    0x000D - return char in windows
    0x000A - newline in windows
    Amit Kankani
    Nokia Developer Champion

  8. #23
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Question Re: Adding static Text to a view.. (Information of Application)

    Quote Originally Posted by amitkankani View Post
    the reason \n\r is not shown is because Symbian new line characters are different... they are as per:
    so which characters shud i use instead of \r\n???

  9. #24
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Adding static Text to a view.. (Information of Application)

    you could try something like this:

    if you want to type in :
    Forum Nokia is a common place to gain knowledge.
    Further it provides great oppurtunities to all.
    if you see there are 2 lines here.... so put this in buffer this way:

    Code:
    _LIT(KTextLine1, "Forum Nokia is a common place to gain knowledge.");
    _LIT(KTextLine2, "Further it provides great oppurtunities to all.");
    myBuf.Append(KTextLine1);
    myBuf.Append(TChar(0x2029));
    myBuf.Append(TChar(0x2028));
    myBuf.Append(KTextLine2);
    or other way would be this way:
    do a Locate() call with TChar(0x000D) and replace it by TChar(0x2029)
    and do a Locate() call with TChar(0x000A) and replace it by TChar(0x2028)

    repeat the above steps till u dont find the chars

    hope this helps !
    Amit Kankani
    Nokia Developer Champion

  10. #25
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Adding static Text to a view.. (Information of Application)

    Personally I feel easier to remember the given SDK Help page, and use CEditableText::ELineBreak/ParagraphDelimiter and the like, but the numbers (0x2028/9 accordingly) are correct too of course.

  11. #26
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Adding static Text to a view.. (Information of Application)

    oh great, i didn't know about them

    well yes ofcourse, using the enum is much better, because in case any time later they change the chars of newline and return character, your code would still work
    Amit Kankani
    Nokia Developer Champion

  12. #27
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Smile Re: Adding static Text to a view.. (Information of Application)

    thank u soooooo muchh..
    Successfull!!!

  13. #28
    Super Contributor
    Join Date
    Jun 2008
    Posts
    593

    Smile Re: Adding static Text to a view.. (Information of Application)

    i have used

    _LIT(KTextLine1, "Forum Nokia is a common place to gain knowledge.");
    _LIT(KTextLine2, "Further it provides great oppurtunities to all.");
    myBuf.Append(KTextLine1);
    myBuf.Append(TChar(0x2029));
    myBuf.Append(TChar(0x2028));
    myBuf.Append(KTextLine2);
    now wat shud i do if i wanna write some text in BOLD??

  14. #29
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    Re: Adding static Text to a view.. (Information of Application)

    I think you are using global text editor if so then there is CEikGlobalTextEditor::TFontStyleFlags which has EStandard,EBold,EItalic,etc...

    Regards,
    Kavit

  15. #30
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Adding static Text to a view.. (Information of Application)

    you can set the font style of entire text in the edwin / global text editor...

    however if you want to have rich text, then you will need CEikRichTextEditor.... : This is an edit window that supports rich text, including embedded objects represented either by icons or glass doors
    Amit Kankani
    Nokia Developer Champion

Similar Threads

  1. GoogleIt
    By deepika.mangla in forum Symbian
    Replies: 5
    Last Post: 2011-05-28, 11:04
  2. Python for UIQ
    By cassioli in forum Symbian
    Replies: 141
    Last Post: 2008-06-11, 18:16
  3. Launching a view of a diffrent application
    By nsivach in forum Symbian
    Replies: 3
    Last Post: 2007-03-22, 09:51
  4. Replies: 0
    Last Post: 2004-11-24, 18:49
  5. filtering application as a recipient?
    By aidj in forum General Messaging
    Replies: 1
    Last Post: 2002-11-12, 06:26

Posting Permissions

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