Discussion Board
-
edit and text color
2005-03-02, 10:50
#1
Registered User
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();
}
-
Editors
2005-03-04, 15:39
#2
Regular Contributor
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
-
Forum Rules