×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    17

    Question Rich Text Box Editor Problem

    Dear All I am working on RichTextboxEditor, my problem is that when I install it on different sets I have to change the height for different resolutions. But I want a generic method or way for RichTextBoxEditor.

    my code is:

    iRichTextEditor = new (ELeave) CEikRichTextEditor;
    iRichTextEditor->ConstructL(this, 10, 2000, 0);

    TInt SMSFieldWidth,SMSFieldHeight;
    SMSFieldWidth=(aRect.Width()-12);
    //SMSFieldHeight=(aRect.Height()-15);//for N73
    SMSFieldHeight=(aRect.Height()-20);//for N80
    TPoint msgPos1(8, 8);
    TPoint msgPos2(SMSFieldWidth, SMSFieldHeight);
    TRect msgRect(msgPos1, msgPos2);
    iRichTextEditor->SetRect(msgRect);

    iRichTextEditor->SetBorder(TGulBorder::ESingleGray);
    iRichTextEditor->SetAknEditorInputMode( EAknEditorTextInputMode);
    iRichTextEditor->CreateScrollBarFrameL();
    iRichTextEditor->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
    iRichTextEditor->SetFocus(ETrue);

    but when I install it on N80 its not work properly.




    I'll be thankful to you for your answers.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    131

    Re: Rich Text Box Editor Problem

    Code:
    	TInt totalH=CEikonEnv::Static()->EikAppUi()->ApplicationRect().Height(); 
    	TInt totalW=CEikonEnv::Static()->EikAppUi()->ApplicationRect().Width();
    	TInt labelH=0.08*totalH;
    	TInt offSet=0.22*totalH;
    	TInt textBoxH=0.3*totalH;
    	iLabel1->SetExtent( TPoint( 7, totalH-textBoxH-labelH-textBoxH-labelH-offSet ), TSize( totalW-7, labelH ) );
    	iRichText1->SetExtent( TPoint( 7, totalH-textBoxH-labelH-textBoxH-offSet ), TSize( totalW-7, textBoxH ) );
    	iLabel2->SetExtent( TPoint( 7, totalH-textBoxH-labelH-offSet ), TSize( totalW-7, labelH ) );
    	iRichText2->SetExtent( TPoint( 7, totalH-textBoxH-offSet ), TSize( totalW-7, textBoxH ) );
    	iRichText1->SetFocus( EFalse );
    this is how i implemented, i placed these codes in the "ConstructL" event in the control class.
    i basically used ->SetExtent to determine the size.

    i also replaced it in the LayoutControls() event which is supposingly the auto generated code form the .design in carbide

Similar Threads

  1. how get the text from rich text editor in the dialog
    By manjunaths in forum Symbian User Interface
    Replies: 4
    Last Post: 2010-12-01, 13:14
  2. Rich Text Box Example
    By mohdalihpk in forum Symbian
    Replies: 5
    Last Post: 2009-11-07, 13:55
  3. Rich Text Editor and Dialog
    By sakhya in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-04-28, 17:08
  4. Rich Text box cut,copy,paste system error
    By skdas in forum Symbian
    Replies: 0
    Last Post: 2003-05-28, 12:16

Posting Permissions

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