Make the text control in the toolbar sample read-only

This text control is used only for logging messages, so don't allow modifying
it.
This commit is contained in:
Cătălin Răceanu 2015-08-31 21:08:34 +03:00 committed by Vadim Zeitlin
parent 57ec523b6f
commit 826296efc3

View File

@ -640,7 +640,8 @@ MyFrame::MyFrame(wxFrame* parent,
PopulateToolbar(m_extraToolBar);
#endif
m_textWindow = new wxTextCtrl(m_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
// Use a read-only text control; Cut tool will not cut selected text anyway.
m_textWindow = new wxTextCtrl(m_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY);
wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
m_panel->SetSizer(sizer);