+ if ( flag == wxCAL_SEQUENTIAL_MONTH_SELECTION )
+ {
+ // changing this style requires recreating the control
+ wxCalendarCtrl *calendar = new wxCalendarCtrl(this, Calendar_CalCtrl,
+ m_calendar->GetDate(),
+ wxDefaultPosition,
+ wxDefaultSize,
+ style);
+ m_sizer->Replace(m_calendar, calendar);
+ delete m_calendar;
+ m_calendar = calendar;
+
+ m_sizer->Layout();
+ }
+ else // just changing the style is enough
+ {
+ m_calendar->SetWindowStyle(style);