]> git.saurik.com Git - wxWidgets.git/commitdiff
wxListbook needs to clean up the wxListCtrl when DeleteAllPages is called.
authorRobin Dunn <robin@alldunn.com>
Wed, 25 Aug 2004 22:10:20 +0000 (22:10 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 25 Aug 2004 22:10:20 +0000 (22:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/listbook.h
src/generic/listbkg.cpp

index 73244fc25634d5fa857eb9fd775a0fea68fec687..a9120755025686ad752f2bbca89cb992b42601c3 100644 (file)
@@ -109,6 +109,8 @@ public:
     // returns true if we have wxLB_TOP or wxLB_BOTTOM style
     bool IsVertical() const { return HasFlag(wxLB_BOTTOM | wxLB_TOP); }
 
+    virtual bool DeleteAllPages();
+
 protected:
     virtual wxWindow *DoRemovePage(size_t page);
 
index c75120bd5951fe5eb2245567fadc5a4ee6183baf..2fcf9a8548cf49e4097adcccb69471aa8902ca02 100644 (file)
@@ -411,6 +411,13 @@ wxWindow *wxListbook::DoRemovePage(size_t page)
     return win;
 }
 
+
+bool wxListbook::DeleteAllPages()
+{
+    m_list->DeleteAllItems();
+    return wxBookCtrl::DeleteAllPages();
+}
+
 // ----------------------------------------------------------------------------
 // wxListbook events
 // ----------------------------------------------------------------------------