RICHTEXT EDITOR

Login to reply to this topic.
Wed, 2005-11-23 05:46
Joined: 2005-11-16
Forum posts: 34
Hi, guys!

I have a code that successfully displays some texts in a richtext editor but some parts such as formatting just don't show up in the output. Here are the codes:

Code:
//richtext
iRtEd   = new(ELeave) CEikRichTextEditor;
iRtEd->ConstructL(this,
CEikEdwin::ENoHorizScrolling|   // <-------- NO VERTICAL SCROLL BAR
CEikEdwin::EDisplayOnly |       // <-------- CURSOR STILL APPEARS AND I CAN STILL EDIT THE TEXTS
CEikEdwin::ENoAutoSelection |   // <-------- ALL TEXTS ARE SELECTED ON START
        EGulFontControlAll,
        EGulAllFonts
,0,100,0);                      // <-------- WHAT'RE THESE????


iRtEd->SetBorder(TGulBorder::ESingleBlack);
iRtEd->CreateScrollBarFrameL(); // <------ NO BORDER APPEARS
iRtEd->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);

iRtEd->SetContainerWindowL(*this);
iRtEd->SetFocus(ETrue);
iRtEd->SetCursorPosL(0, EFalse); // <------- CURSOR DOESN'T GO TO POSITION 0

iRtEd->ActivateL();
SetRect(aRect);

TestL(); //<----------- THIS PART DOES THE APPENDING OF TEXTS

// Set text/para formatting
iRtEd->SetSelectionL(0, iRtEd->Text()->DocumentLength());

TCharFormat charFormatCenter;
TCharFormatMask charFormatMaskCenter;
iRtEd->ApplyCharFormatL(charFormatCenter, charFormatMaskCenter); // <--- TEXTS DON'T GET CENTERED
//END: formatting

//end:richtext

Mon, 2005-11-28 10:15
Joined: 2004-07-09
Forum posts: 110
Re: ***RICHTEXT EDITOR***
Hi Jhourlad,

   Try to set the attribute for TCharFormatMask using ,
TCharFormatMask::SetAttrib(TTextFormatAttribute  Attribute);

DipakBaviskar

  • Login to reply to this topic.