Clear removes all rows from the table
()
| 532 | |
| 533 | // Clear removes all rows from the table |
| 534 | func (t *Table) Clear() { |
| 535 | |
| 536 | for ri := 0; ri < len(t.rows); ri++ { |
| 537 | trow := t.rows[ri] |
| 538 | t.Panel.Remove(trow) |
| 539 | trow.DisposeChildren(true) |
| 540 | trow.Dispose() |
| 541 | } |
| 542 | t.rows = nil |
| 543 | t.firstRow = 0 |
| 544 | t.rowCursor = -1 |
| 545 | t.recalc() |
| 546 | t.Dispatch(OnTableRowCount, nil) |
| 547 | } |
| 548 | |
| 549 | // SelectedRows returns a slice with the indexes of the currently selected rows |
| 550 | // If no row are selected returns an empty slice |