/////////////////////////////////////////////////////////////////////////////
-// Program: wxWindows Widgets Sample
+// Program: wxWidgets Widgets Sample
// Name: listbox.cpp
// Purpose: Part of the widgets sample showing wxListbox
// Author: Vadim Zeitlin
#pragma hdrstop
#endif
+#if wxUSE_LISTBOX
+
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/checklst.h"
#include "widgets.h"
-#if 1
+
#include "icons/listbox.xpm"
// ----------------------------------------------------------------------------
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
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));
CreateLbox();
}
-#endif
+#endif // wxUSE_LISTBOX