rowsHeight returns the available start y coordinate and height in the table for rows, considering the visibility of the header and status panels.
()
| 1418 | // rowsHeight returns the available start y coordinate and height in the table for rows, |
| 1419 | // considering the visibility of the header and status panels. |
| 1420 | func (t *Table) rowsHeight() (float32, float32) { |
| 1421 | |
| 1422 | start := float32(0) |
| 1423 | height := t.ContentHeight() |
| 1424 | if t.header.Visible() { |
| 1425 | height -= t.header.Height() |
| 1426 | start += t.header.Height() |
| 1427 | } |
| 1428 | if t.statusPanel.Visible() { |
| 1429 | height -= t.statusPanel.Height() |
| 1430 | } |
| 1431 | if height < 0 { |
| 1432 | return 0, 0 |
| 1433 | } |
| 1434 | return start, height |
| 1435 | } |
| 1436 | |
| 1437 | // setVScrollBar sets the visibility state of the vertical scrollbar |
| 1438 | func (t *Table) setVScrollBar(state bool) { |
no test coverage detected