+
+ if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) )
+ {
+ delete m_comboMonth;
+ delete m_staticMonth;
+ delete m_spinYear;
+ delete m_staticYear;
+ }
+}
+
+void wxCalendarCtrl::SetWindowStyleFlag(long style)
+{
+ // changing this style doesn't work because the controls are not
+ // created/shown/hidden accordingly
+ wxASSERT_MSG( (style & wxCAL_SEQUENTIAL_MONTH_SELECTION) ==
+ (m_windowStyle & wxCAL_SEQUENTIAL_MONTH_SELECTION),
+ _T("wxCAL_SEQUENTIAL_MONTH_SELECTION can't be changed after creation") );
+
+ wxControl::SetWindowStyleFlag(style);