- m_textrich->SetForegroundColour(wxColour(0, 255, 255));
- m_textrich->SetBackgroundColour(*wxBLUE);
+
+ m_textrich->SetStyle(0, 10, *wxRED);
+ m_textrich->SetStyle(10, 20, *wxBLUE);
+ m_textrich->SetStyle(30, 40,
+ wxTextAttr(*wxGREEN, wxNullColour, *wxITALIC_FONT));
+ m_textrich->SetDefaultStyle(wxTextAttr());
+ m_textrich->AppendText(_T("\n\nFirst 10 characters should be in red\n"));
+ m_textrich->AppendText(_T("Next 10 characters should be in blue\n"));
+ m_textrich->AppendText(_T("Next 10 characters should be normal\n"));
+ m_textrich->AppendText(_T("And the next 10 characters should be green and italic\n"));
+ m_textrich->SetDefaultStyle(wxTextAttr(*wxCYAN, *wxBLUE));
+ m_textrich->AppendText(_T("This text should be cyan on blue\n"));
+ m_textrich->SetDefaultStyle(*wxBLUE);
+ m_textrich->AppendText(_T("And this should be in blue and the text you ")
+ _T("type should be in blue as well"));