The object of CEikRichTextEditor does not scale

Login to reply to this topic.
Thu, 2008-02-07 15:07
Joined: 2004-12-07
Forum posts: 72

Hello,

I use two objects of CEikRichTextEditor in one window.

iRt1 = new (ELeave) CEikRichTextEditor();
iEditPhraseEdwin->SetContainerWindowL (*this);
iEditPhraseEdwin->ConstructL (CEikEdwin::ENoAutoSelection | CEikEdwin::EReadOnly | CEikEdwin::EAvkonDisableCursor|CEikEdwin::EAvkonEditor );

iRt2 = new (ELeave) CEikRichTextEditor();
iEditPhraseEdwin->SetContainerWindowL (*this);
iEditPhraseEdwin->ConstructL (CEikEdwin::ENoAutoSelection | CEikEdwin::EReadOnly | CEikEdwin::EAvkonDisableCursor|CEikEdwin::EAvkonEditor );

when I switch the phone from portrait mode to landscape mode, those two rich text editors do not scale.

I also use this function to set the size of the rich text editor
void SizeChanged()
{
TInt height = (Size().iHeight) / 2;
TInt width= Size().iWidth;
TPoint edit_origin(0, 0);
TPoint disp_origin(0, height);

iRt1->SetExtent (edit_origin, TSize (width, height));
iRt2->SetExtent (disp_origin, TSize (width, height));


Mon, 2008-02-18 12:04
Joined: 2004-05-21
Forum posts: 48
Re: The object of CEikRichTextEditor does not scale

Are you overriding HandleResourceChange() in your container...If not then you might have to ...

void YourContainer::HandleResourceChange(TInt aType)
{
if( aType == KEikDynamicLayoutVariantSwitch )
{
if(iView)
{
SetRect(iView->ClientRect());
}
}
}


Dushyant Gaur
Software Specialist,
Kodiak Networks,
No 401 Prestige Sigma, 4th Floor
3 Vittal Mallya Road
Bangalore - 560 001
India

  • Login to reply to this topic.