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..
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..
though i have never used Global text editor, i would rather use CeikEdwin in read only mode !
Amit Kankani
Nokia Developer Champion
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
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.
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
you could try something like this:
if you want to type in :
if you see there are 2 lines here.... so put this in buffer this way:Forum Nokia is a common place to gain knowledge.
Further it provides great oppurtunities to all.
or other way would be 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);
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
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.
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
i have used
now wat shud i do if i wanna write some text in BOLD??_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);
I think you are using global text editor if so then there is CEikGlobalTextEditor::TFontStyleFlags which has EStandard,EBold,EItalic,etc...
Regards,
Kavit
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