X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/efe66bbc0e9f463a6dd3ad49717474dd801bebf3..5a566d89be51576b079dc1b7940304390d11b950:/samples/widgets/textctrl.cpp diff --git a/samples/widgets/textctrl.cpp b/samples/widgets/textctrl.cpp index a30268abdd..aee45b0f9f 100644 --- a/samples/widgets/textctrl.cpp +++ b/samples/widgets/textctrl.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Program: wxWindows Widgets Sample +// Program: wxWidgets Widgets Sample // Name: textctrl.cpp // Purpose: part of the widgets sample showing wxTextCtrl // Author: Vadim Zeitlin @@ -113,8 +113,10 @@ class TextWidgetsPage : public WidgetsPage { public: // ctor(s) and dtor - TextWidgetsPage(wxNotebook *notebook, wxImageList *imaglist); - virtual ~TextWidgetsPage(); + TextWidgetsPage(wxBookCtrl *book, wxImageList *imaglist); + virtual ~TextWidgetsPage(){}; + + virtual wxControl *GetWidget() const { return m_text; } protected: // create an info text contorl @@ -203,7 +205,7 @@ protected: wxString m_range10_20; private: - // any class wishing to process wxWindows events must use this macro + // any class wishing to process wxWidgets events must use this macro DECLARE_EVENT_TABLE() DECLARE_WIDGETS_PAGE(TextWidgetsPage) }; @@ -308,8 +310,8 @@ IMPLEMENT_WIDGETS_PAGE(TextWidgetsPage, _T("Text")); // TextWidgetsPage creation // ---------------------------------------------------------------------------- -TextWidgetsPage::TextWidgetsPage(wxNotebook *notebook, wxImageList *imaglist) - : WidgetsPage(notebook) +TextWidgetsPage::TextWidgetsPage(wxBookCtrl *book, wxImageList *imaglist) + : WidgetsPage(book) { imaglist->Add(wxBitmap(text_xpm)); @@ -499,10 +501,6 @@ TextWidgetsPage::TextWidgetsPage(wxNotebook *notebook, wxImageList *imaglist) sizerTop->Fit(this); } -TextWidgetsPage::~TextWidgetsPage() -{ -} - // ---------------------------------------------------------------------------- // creation helpers // ---------------------------------------------------------------------------- @@ -817,6 +815,7 @@ void TextWidgetsPage::OnText(wxCommandEvent& WXUNUSED(event)) void TextWidgetsPage::OnTextEnter(wxCommandEvent& event) { wxLogMessage(_T("Text entered: '%s'"), event.GetString().c_str()); + event.Skip(); } void TextWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))