diff --git a/samples/grid/griddemo.cpp b/samples/grid/griddemo.cpp index 8056c6da1f..2d345f6796 100644 --- a/samples/grid/griddemo.cpp +++ b/samples/grid/griddemo.cpp @@ -316,6 +316,7 @@ wxBEGIN_EVENT_TABLE( GridFrame, wxFrame ) EVT_MENU( ID_SELROWS, GridFrame::SelectRows ) EVT_MENU( ID_SELCOLS, GridFrame::SelectCols ) EVT_MENU( ID_SELROWSORCOLS, GridFrame::SelectRowsOrCols ) + EVT_MENU( ID_SELNONE, GridFrame::SelectNone ) EVT_MENU( ID_FREEZE_OR_THAW, GridFrame::FreezeOrThaw ) @@ -536,6 +537,7 @@ GridFrame::GridFrame() selectionMenu->Append( ID_SELROWS, "Select &rows" ); selectionMenu->Append( ID_SELCOLS, "Select col&umns" ); selectionMenu->Append( ID_SELROWSORCOLS, "Select rows &or columns" ); + selectionMenu->Append( ID_SELNONE, "&Disallow selection" ); wxMenu *autosizeMenu = new wxMenu; autosizeMenu->Append( ID_SIZE_ROW, "Selected &row data" ); @@ -1443,6 +1445,11 @@ void GridFrame::SelectRowsOrCols( wxCommandEvent& WXUNUSED(ev) ) grid->SetSelectionMode( wxGrid::wxGridSelectRowsOrColumns ); } +void GridFrame::SelectNone( wxCommandEvent& WXUNUSED(ev) ) +{ + grid->SetSelectionMode( wxGrid::wxGridSelectNone ); +} + void GridFrame::FreezeOrThaw(wxCommandEvent& ev) { if ( ev.IsChecked() ) diff --git a/samples/grid/griddemo.h b/samples/grid/griddemo.h index fa196b0643..0957d40b8d 100644 --- a/samples/grid/griddemo.h +++ b/samples/grid/griddemo.h @@ -76,6 +76,7 @@ class GridFrame : public wxFrame void SelectRows( wxCommandEvent& ); void SelectCols( wxCommandEvent& ); void SelectRowsOrCols( wxCommandEvent& ); + void SelectNone( wxCommandEvent& ); void FreezeOrThaw( wxCommandEvent& ); @@ -192,6 +193,7 @@ public: ID_SELROWS, ID_SELCOLS, ID_SELROWSORCOLS, + ID_SELNONE, ID_SET_CELL_FG_COLOUR, ID_SET_CELL_BG_COLOUR, ID_VTABLE,