#endif
// create the main application window
- MyFrame *frame = new MyFrame(_T("wxRichTextCtrl Sample"), wxID_ANY, wxDefaultPosition, wxSize(600, 500));
+ MyFrame *frame = new MyFrame(_T("wxRichTextCtrl Sample"), wxID_ANY, wxDefaultPosition, wxSize(700, 600));
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
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);
m_richTextCtrl->SetFont(font);
+ combo->SetStyleSheet(wxGetApp().GetStyleSheet());
+ combo->SetRichTextCtrl(m_richTextCtrl);
+ combo->UpdateStyles();
+
wxRichTextStyleListBox* styleListBox = new wxRichTextStyleListBox(splitter, wxID_ANY);
wxSize display = wxGetDisplaySize();
}
else
{
- splitter->SplitVertically(m_richTextCtrl, styleListBox, 400);
+ splitter->SplitVertically(m_richTextCtrl, styleListBox, 500);
}
splitter->UpdateSize();