X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a0086878b09ea394de9f5746a5e8f066a3d12dec..1ee3fb3846ae47c5292128a6f0bd4c8e38d7ba31:/samples/widgets/listbox.cpp?ds=sidebyside diff --git a/samples/widgets/listbox.cpp b/samples/widgets/listbox.cpp index ccb48ec29f..686cbe4021 100644 --- a/samples/widgets/listbox.cpp +++ b/samples/widgets/listbox.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Program: wxWindows Widgets Sample +// Program: wxWidgets Widgets Sample // Name: listbox.cpp // Purpose: Part of the widgets sample showing wxListbox // Author: Vadim Zeitlin @@ -24,6 +24,8 @@ #pragma hdrstop #endif +#if wxUSE_LISTBOX + // for all others, include the necessary headers #ifndef WX_PRECOMP #include "wx/log.h" @@ -43,7 +45,7 @@ #include "wx/checklst.h" #include "widgets.h" -#if 1 + #include "icons/listbox.xpm" // ---------------------------------------------------------------------------- @@ -74,7 +76,9 @@ enum class ListboxWidgetsPage : public WidgetsPage { public: - ListboxWidgetsPage(wxNotebook *notebook, wxImageList *imaglist); + ListboxWidgetsPage(wxBookCtrl *book, wxImageList *imaglist); + + virtual wxControl *GetWidget() const { return m_lbox; } protected: // event handlers @@ -189,9 +193,9 @@ END_EVENT_TABLE() IMPLEMENT_WIDGETS_PAGE(ListboxWidgetsPage, _T("Listbox")); -ListboxWidgetsPage::ListboxWidgetsPage(wxNotebook *notebook, +ListboxWidgetsPage::ListboxWidgetsPage(wxBookCtrl *book, wxImageList *imaglist) - : WidgetsPage(notebook) + : WidgetsPage(book) { imaglist->Add(wxBitmap(listbox_xpm)); @@ -517,4 +521,4 @@ void ListboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event)) CreateLbox(); } -#endif +#endif // wxUSE_LISTBOX