×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    8

    edit and text color

    I create edit control and fill it to text from file.
    Text in control have green color.
    How I can change it?
    I try some metods, but without effect.

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

    TResourceReader reader;
    iCoeEnv->CreateResourceReaderLC(reader, R_VIEW_ABOUT_EDITOR);
    iEdwin = new (ELeave) CEikEdwin;
    iEdwin->SetAknEditorFlags(EAknEditorFlagEnableScrollBars);
    iEdwin->SetContainerWindowL(*this);
    iEdwin->ConstructFromResourceL(reader);
    CleanupStack::PopAndDestroy(); // Resource reader
    iEdwin->SetObserver(this);
    iEdwin->SetBorder(TGulBorder::ESingleBlack);
    iEdwin->SetNonFocusing();
    iEdwin->SetReadOnly(ETrue);
    iEdwin->SetRect(aRect);

    SetRect(aRect);
    ActivateL();

    TFileName strHelpPath(AppPath());
    strHelpPath.Append(g_strAbout_FileName);
    iEdwin->Text()->ImportTextFileL(0,strHelpPath,CPlainText::EOrganiseByParagraph);
    iEdwin->NotifyNewDocumentL();
    }

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475

    Editors

    Please check the Rich text example
    Series 60 Developer Platform 1.0: Rich-Text Editor Example v1.0
    File name: RTx_S60_v1_0.zip

    It is at the main page under Technologies/ Symbian C++.There are 'Symbian C++ Code and Examples'

    In bieft :

    TCharFormat charFormat;
    TCharFormatMask charFormatMask;
    charFormat.iFontPresentation.iTextColor=KRgbBlue;
    charFormatMask.SetAttrib(EAttColor );
    iRtEd->ApplyCharFormatL(charFormat, charFormatMask); // For Richtext

    Edwin->SetCharFormatLayer(); // For normal Edwin

    Best Regards,
    (V) - Forum Nokia Developer Support

Posting Permissions

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