+void GridFrame::ToggleGridLines( wxCommandEvent& WXUNUSED(ev) )
+{
+ grid->EnableGridLines(
+ GetMenuBar()->IsChecked( ID_TOGGLEGRIDLINES ) );
+}
+
+void GridFrame::OnSetHighlightWidth( wxCommandEvent& WXUNUSED(ev) )
+{
+ wxString choices[] = { _T("0"), _T("1"), _T("2"), _T("3"), _T("4"), _T("5"), _T("6"), _T("7"), _T("8"), _T("9"), _T("10")};
+
+ wxSingleChoiceDialog dlg(this, _T("Choose the thickness of the highlight pen:"),
+ _T("Pen Width"), 11, choices);
+
+ int current = grid->GetCellHighlightPenWidth();
+ dlg.SetSelection(current);
+ if (dlg.ShowModal() == wxID_OK) {
+ grid->SetCellHighlightPenWidth(dlg.GetSelection());
+ }
+}
+
+void GridFrame::OnSetROHighlightWidth( wxCommandEvent& WXUNUSED(ev) )
+{
+ wxString choices[] = { _T("0"), _T("1"), _T("2"), _T("3"), _T("4"), _T("5"), _T("6"), _T("7"), _T("8"), _T("9"), _T("10")};
+
+ wxSingleChoiceDialog dlg(this, _T("Choose the thickness of the highlight pen:"),
+ _T("Pen Width"), 11, choices);
+
+ int current = grid->GetCellHighlightROPenWidth();
+ dlg.SetSelection(current);
+ if (dlg.ShowModal() == wxID_OK) {
+ grid->SetCellHighlightROPenWidth(dlg.GetSelection());
+ }
+}
+
+
+
+void GridFrame::AutoSizeCols( wxCommandEvent& WXUNUSED(ev) )
+{
+ grid->AutoSizeColumns();
+ grid->Refresh();
+}
+
+void GridFrame::CellOverflow( wxCommandEvent& ev )
+{
+ grid->SetDefaultCellOverflow(ev.IsChecked());
+ grid->Refresh();
+}
+
+void GridFrame::ResizeCell( wxCommandEvent& ev )
+{
+ if (ev.IsChecked())
+ grid->SetCellSize( 7, 1, 5, 5 );
+ else
+ grid->SetCellSize( 7, 1, 1, 5 );
+ grid->Refresh();
+}
+