| 428 | |
| 429 | |
| 430 | void CsvGrid::startEditing(int R, int C) { |
| 431 | DEBUG_PRINTF("#### CsvGrid::startEditing\n"); |
| 432 | row_edit = R; // Now editing this row/col |
| 433 | col_edit = C; |
| 434 | int X,Y,W,H; |
| 435 | find_cell(CONTEXT_CELL, R,C, X,Y,W,H); // Find X/Y/W/H of cell |
| 436 | input->resize(X,Y,W,H); // Move CODE_INPUT_WIDGET widget there |
| 437 | #ifdef DEBUG |
| 438 | std::cerr << "startEditing/getCell(" << R << "," << C << ")" << std::endl; |
| 439 | #endif |
| 440 | strncpy(input_buffer, dataTable->getCell(R,C).c_str(), TCRUNCHER_MAX_CELL_LENGTH ); |
| 441 | input->value(input_buffer); |
| 442 | input->textsize(text_font_size); |
| 443 | input->insert_position(0,strlen(input_buffer)); // select entire input field |
| 444 | input->show(); // Show the input widget, now that we've positioned it |
| 445 | input->take_focus(); |
| 446 | } |
| 447 | |
| 448 | |
| 449 | void CsvGrid::doneEditing(bool save) { |