(m *Scene)
| 561 | } |
| 562 | |
| 563 | func (tb *Table) contextMenu(m *Scene) { |
| 564 | e := NewButton(m) |
| 565 | if tb.IsReadOnly() { |
| 566 | e.SetText("View").SetIcon(icons.Visibility) |
| 567 | } else { |
| 568 | e.SetText("Edit").SetIcon(icons.Edit) |
| 569 | } |
| 570 | e.OnClick(func(e events.Event) { |
| 571 | tb.editIndex(tb.SelectedIndex) |
| 572 | }) |
| 573 | } |
| 574 | |
| 575 | // Header layout: |
| 576 |
nothing calls this directly
no test coverage detected