+void MyFrame::OnCalToggleResizable(wxCommandEvent& event)
+{
+ wxSizer * const sizer = m_panel->GetSizer();
+ wxSizerItem * const item = sizer->GetItem(m_panel->GetCal());
+ if ( event.IsChecked() )
+ {
+ item->SetProportion(1);
+ item->SetFlag(wxEXPAND);
+ }
+ else // not resizable
+ {
+ item->SetProportion(0);
+ item->SetFlag(wxALIGN_CENTER);
+ }
+
+ sizer->Layout();
+}
+