]> git.saurik.com Git - wxWidgets.git/commitdiff
wxCalendarCtrl::Destroy() now deletes year spin control and
authorMattia Barbon <mbarbon@cpan.org>
Tue, 2 Apr 2002 17:46:45 +0000 (17:46 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Tue, 2 Apr 2002 17:46:45 +0000 (17:46 +0000)
month combo box; tested in MSW and GTK .

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/calctrl.h
src/generic/calctrl.cpp

index 12a10c43f53e1a336d9db0238444ccc940cae93d..7b8f072fb996e9af12f9e531b1d2c50e4016c0ca 100644 (file)
@@ -60,6 +60,8 @@ public:
 
     virtual ~wxCalendarCtrl();
 
+    virtual bool Destroy();
+
     // set/get the current date
     // ------------------------
 
index 14c60e526734892fd0fdeb3f432daa230ba11a30..9c70985528f3f19382140d55207d802e869ef042 100644 (file)
@@ -253,6 +253,18 @@ wxCalendarCtrl::~wxCalendarCtrl()
 // forward wxWin functions to subcontrols
 // ----------------------------------------------------------------------------
 
+bool wxCalendarCtrl::Destroy()
+{
+    if( m_staticYear ) m_staticYear->Destroy();
+    if( m_spinYear ) m_spinYear->Destroy();
+    if( m_comboMonth ) m_comboMonth->Destroy();
+    if( m_staticMonth ) m_staticMonth->Destroy();
+
+    m_staticYear = 0; m_spinYear = 0; m_comboMonth = 0; m_staticMonth = 0;
+
+    return wxControl::Destroy();
+}
+
 bool wxCalendarCtrl::Show(bool show)
 {
     if ( !wxControl::Show(show) )