#include "wx/statline.h"
#include "wx/generic/stattextg.h"
+#include "wx/wupdlock.h"
#include "widgets.h"
#include "icons/statbox.xpm"
m_textBox = new wxTextCtrl(this, wxID_ANY, wxEmptyString);
wxButton *b1 = new wxButton(this, wxID_ANY, "Change &box label");
- b1->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+ b1->Connect(wxEVT_BUTTON,
wxCommandEventHandler(StaticWidgetsPage::OnButtonBoxText),
NULL, this);
sizerMiddle->Add(m_textBox, 0, wxEXPAND|wxALL, 5);
wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE|wxHSCROLL);
wxButton *b2 = new wxButton(this, wxID_ANY, "Change &text label");
- b2->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+ b2->Connect(wxEVT_BUTTON,
wxCommandEventHandler(StaticWidgetsPage::OnButtonLabelText),
NULL, this);
sizerMiddle->Add(m_textLabel, 0, wxEXPAND|wxALL, 5);
wxTE_MULTILINE|wxHSCROLL);
wxButton *b3 = new wxButton(this, wxID_ANY, "Change decorated text label");
- b3->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+ b3->Connect(wxEVT_BUTTON,
wxCommandEventHandler(StaticWidgetsPage::OnButtonLabelWithMarkupText),
NULL, this);
sizerMiddle->Add(m_textLabelWithMarkup, 0, wxEXPAND|wxALL, 5);
sizerMiddle->Add(b3, 0, wxLEFT|wxBOTTOM, 5);
- m_chkGreen = CreateCheckBoxAndAddToSizer(sizerLeft,
+ m_chkGreen = CreateCheckBoxAndAddToSizer(sizerMiddle,
"Decorated label on g&reen");
-
- sizerMiddle->Add(m_chkGreen, 0, wxALL, 5);
#endif // wxUSE_MARKUP
// final initializations
void StaticWidgetsPage::CreateStatic()
{
+ wxWindowUpdateLocker lock(this);
+
bool isVert = m_chkVert->GetValue();
if ( m_sizerStatBox )