added text style support to wxTextCtrl for MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -253,13 +253,10 @@ MyFrame::MyFrame()
|
||||
wxMenu *fileMenu = new wxMenu;
|
||||
fileMenu->Append(Menu_File_Quit, "E&xit\tAlt-X", "Quit toolbar sample");
|
||||
|
||||
// not supported just yet
|
||||
#ifndef __WXUNIVERSAL__
|
||||
wxMenuItem *itemBitmap = new wxMenuItem(fileMenu, Menu_File_Quit,
|
||||
"Quit with &bitmap\tAlt-Q");
|
||||
itemBitmap->SetBitmap(wxBitmap(copy_xpm));
|
||||
fileMenu->Append(itemBitmap);
|
||||
#endif // __WXUNIVERSAL__
|
||||
|
||||
wxMenu *menubarMenu = new wxMenu;
|
||||
menubarMenu->Append(Menu_MenuBar_Append, "&Append menu\tCtrl-A",
|
||||
|
@@ -645,8 +645,17 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
||||
"wxHSCROLL style",
|
||||
wxPoint(450, 10), wxSize(200, 230),
|
||||
wxTE_RICH | wxTE_MULTILINE | wxHSCROLL);
|
||||
#ifdef __WXMSW__
|
||||
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(*wxBLUE);
|
||||
m_textrich->AppendText(_T("\nIs this text really in blue?"));
|
||||
#else
|
||||
m_textrich->SetForegroundColour(wxColour(0, 255, 255));
|
||||
m_textrich->SetBackgroundColour(*wxBLUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyPanel::OnSize( wxSizeEvent &event )
|
||||
|
Reference in New Issue
Block a user