X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5bdfc69a576eb32f680f962feec04935f6e71eb..14619f10b0bdb630206607abd0ce0319d45e095a:/samples/widgets/static.cpp diff --git a/samples/widgets/static.cpp b/samples/widgets/static.cpp index a2a363c6d5..3307ae047b 100644 --- a/samples/widgets/static.cpp +++ b/samples/widgets/static.cpp @@ -41,6 +41,7 @@ #include "wx/statline.h" #include "wx/generic/stattextg.h" +#include "wx/wupdlock.h" #include "widgets.h" #include "icons/statbox.xpm" @@ -298,7 +299,7 @@ void StaticWidgetsPage::CreateContent() 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); @@ -308,7 +309,7 @@ void StaticWidgetsPage::CreateContent() 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); @@ -320,16 +321,14 @@ void StaticWidgetsPage::CreateContent() 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 @@ -378,6 +377,8 @@ void StaticWidgetsPage::Reset() void StaticWidgetsPage::CreateStatic() { + wxWindowUpdateLocker lock(this); + bool isVert = m_chkVert->GetValue(); if ( m_sizerStatBox )