| 5201 | } |
| 5202 | |
| 5203 | void OnCommand(wxCommandEvent &evt) |
| 5204 | { |
| 5205 | if (evt.GetId() == IDDD_CHANGENUMROWS) |
| 5206 | { |
| 5207 | wxString result = wxGetTextFromUser("Enter number of data rows", "Edit Table", |
| 5208 | wxString::Format("%d", Grid->GetNumberRows()), this ); |
| 5209 | if (result.IsEmpty()) return; |
| 5210 | |
| 5211 | long l=0; |
| 5212 | if ( result.ToLong(&l) && l > 0 ) |
| 5213 | { |
| 5214 | Grid->ResizeGrid( l, Grid->GetNumberCols() ); |
| 5215 | } |
| 5216 | else |
| 5217 | wxMessageBox("Invalid number of rows or non-numeric entry."); |
| 5218 | } |
| 5219 | else if (evt.GetId() == IDDD_COPY) |
| 5220 | Grid->Copy(true); |
| 5221 | else if (evt.GetId() == IDDD_PASTE) |
| 5222 | Grid->Paste( wxExtGridCtrl::PASTE_ALL ); |
| 5223 | else if (evt.GetId() == wxID_HELP) |
| 5224 | SamApp::ShowHelp("edit_data_table_column"); |
| 5225 | } |
| 5226 | |
| 5227 | DECLARE_EVENT_TABLE(); |
| 5228 | }; |
nothing calls this directly
no test coverage detected