RowFirstVisWidget returns the first visible widget for given row (could be index or not) -- false if out of range
(row int)
| 531 | // RowFirstVisWidget returns the first visible widget for given row (could be |
| 532 | // index or not) -- false if out of range |
| 533 | func (tb *Table) RowFirstVisWidget(row int) (*core.WidgetBase, bool) { |
| 534 | if !tb.IsRowInBounds(row) { |
| 535 | return nil, false |
| 536 | } |
| 537 | nWidgPerRow, idxOff := tb.RowWidgetNs() |
| 538 | lg := tb.ListGrid |
| 539 | w := lg.Children[row*nWidgPerRow].(core.Widget).AsWidget() |
| 540 | if w.Geom.TotalBBox != (image.Rectangle{}) { |
| 541 | return w, true |
| 542 | } |
| 543 | ridx := nWidgPerRow * row |
| 544 | for fli := 0; fli < tb.NCols; fli++ { |
| 545 | w := lg.Child(ridx + idxOff + fli).(core.Widget).AsWidget() |
| 546 | if w.Geom.TotalBBox != (image.Rectangle{}) { |
| 547 | return w, true |
| 548 | } |
| 549 | } |
| 550 | return nil, false |
| 551 | } |
| 552 | |
| 553 | // RowGrabFocus grabs the focus for the first focusable widget in given row -- |
| 554 | // returns that element or nil if not successful -- note: grid must have |
nothing calls this directly
no test coverage detected