Style listbox now shows current style
Added combo control for selecting styles Updated the sample to show the combo control git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -490,6 +490,9 @@ MyFrame::MyFrame(const wxString& title, wxWindowID id, const wxPoint& pos,
|
||||
toolBar->AddSeparator();
|
||||
toolBar->AddTool(ID_FORMAT_FONT, wxBitmap(font_xpm), wxNullBitmap, false, -1, -1, (wxObject *) NULL, _("Font"));
|
||||
|
||||
wxRichTextStyleComboCtrl* combo = new wxRichTextStyleComboCtrl(toolBar, wxID_ANY, wxDefaultPosition, wxSize(200, -1));
|
||||
toolBar->AddControl(combo);
|
||||
|
||||
toolBar->Realize();
|
||||
|
||||
wxSplitterWindow* splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, GetClientSize(), wxSP_NO_XP_THEME|wxSP_3D|wxSP_LIVE_UPDATE);
|
||||
@@ -503,6 +506,10 @@ MyFrame::MyFrame(const wxString& title, wxWindowID id, const wxPoint& pos,
|
||||
|
||||
m_richTextCtrl->SetFont(font);
|
||||
|
||||
combo->SetStyleSheet(wxGetApp().GetStyleSheet());
|
||||
combo->SetRichTextCtrl(m_richTextCtrl);
|
||||
combo->UpdateStyles();
|
||||
|
||||
wxRichTextStyleListBox* styleListBox = new wxRichTextStyleListBox(splitter, wxID_ANY);
|
||||
|
||||
wxSize display = wxGetDisplaySize();
|
||||
|
Reference in New Issue
Block a user