MCPcopy Create free account
hub / github.com/cogentcore/core / contextMenu

Method contextMenu

core/table.go:563–573  ·  view source on GitHub ↗
(m *Scene)

Source from the content-addressed store, hash-verified

561}
562
563func (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

Callers

nothing calls this directly

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 6

SetTextMethod · 0.95
editIndexMethod · 0.95
NewButtonFunction · 0.85
SetIconMethod · 0.65
IsReadOnlyMethod · 0.45
OnClickMethod · 0.45

Tested by

no test coverage detected