From 826296efc3f6cbcd2a309e4143ee3c794d9c9564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C4=83t=C4=83lin=20R=C4=83ceanu?= Date: Mon, 31 Aug 2015 21:08:34 +0300 Subject: [PATCH] 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. --- samples/toolbar/toolbar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index 57e6c2757e..6464a9fe41 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -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);