Hello,
I'm having a hard time with CEikRichTextEditor.
I want to display the content of a unicode file :
In constructL()

void CNSContainerHelp::ConstructL( const TRect& aRect )
{
CreateWindowL();


iEdit = new (ELeave) CEikRichTextEditor;

TResourceReader reader;
iCoeEnv->CreateResourceReaderLC(reader, R_READONLY_EDITOR);
iEdit->ConstructFromResourceL(reader);
CleanupStack::PopAndDestroy(); // reader

iEdit->SetContainerWindowL(*this);
iEdit->SetSize(aRect.Size());

// Set the font to black for the entire control
TFontSpec fontspec = LatinPlain12()->FontSpecInTwips();
TCharFormat charFormat(fontspec.iTypeface.iName, fontspec.iHeight);
TCharFormatMask charFormatMask;
charFormat.iFontPresentation.iTextColor = KRgbBlack;
charFormatMask.SetAttrib(EAttColor);
charFormatMask.SetAttrib(EAttFontTypeface);
charFormatMask.SetAttrib(EAttFontHeight);

charFormatLayer = CEikonEnv::NewDefaultCharFormatLayerL();
charFormatLayer->Sense(charFormat, charFormatMask);
charFormatLayer->SetL(charFormat, charFormatMask);

iEdit->SetCharFormatLayer(charFormatLayer);

TFileName filename(KDataFilePath);

const CPlainText::TTextOrganisation aTextOrganisation = CPlainText::EOrganiseByParagraph;
iEdit->InsertFromTextFileL(filename,aTextOrganisation);

iEdit->SetFocus(ETrue);
iEdit->ClearSelectionL();
SetRect( aRect );

ActivateL();
iEdit->SetCursorPosL(0, EFalse);

}

The prb is that on display I have a blank screen. I have to use the scroll bar to see some text. And the scrollbar itself behave strangly..

TKeyResponse CNSContainerHelp::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
if (aType == EEventKey)
{
if (aKeyEvent.iCode == EKeyDownArrow)
{
iEdit->MoveCursorL (TCursorPosition::EFPageDown, EFalse);
return EKeyWasConsumed;
}
else if (aKeyEvent.iCode == EKeyUpArrow)
{
iEdit->MoveCursorL(TCursorPosition::EFPageUp, EFalse);
return EKeyWasConsumed;
}
}
return EKeyWasNotConsumed;
}

Some time one line is missing, sometimes half of the screen is blank and if i go to the top it goes to the blank page of the beginning..

I've also try to use SetTextL, SetDocumentContentL .. same result..
My idea is that there is a prb with the scrollbar thumb but i don't know how to change it.. I don't know the number of line in the file..

Any idea?