ScrollUp scrolls the table the specified number of rows up if possible
(n int)
| 741 | |
| 742 | // ScrollUp scrolls the table the specified number of rows up if possible |
| 743 | func (t *Table) scrollUp(n int) { |
| 744 | |
| 745 | // Calculates number of rows to scroll up |
| 746 | if t.firstRow == 0 { |
| 747 | return |
| 748 | } |
| 749 | if n > t.firstRow { |
| 750 | n = t.firstRow |
| 751 | } |
| 752 | t.firstRow -= n |
| 753 | lastRow := t.lastRow - n |
| 754 | if t.rowCursor > lastRow { |
| 755 | t.rowCursor = lastRow |
| 756 | t.Dispatch(OnChange, nil) |
| 757 | } |
| 758 | t.recalc() |
| 759 | } |
| 760 | |
| 761 | // removeRow removes from the table the row specified its index |
| 762 | func (t *Table) removeRow(row int) { |