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

Method SetEnabled

core/flags.go:48–50  ·  view source on GitHub ↗

SetEnabled sets the [states.Disabled] flag to the opposite of the given value.

(enabled bool)

Source from the content-addressed store, hash-verified

46
47// SetEnabled sets the [states.Disabled] flag to the opposite of the given value.
48func (wb *WidgetBase) SetEnabled(enabled bool) *WidgetBase {
49 return wb.SetState(!enabled, states.Disabled)
50}
51
52// IsDisabled returns whether this node is flagged as [Disabled].
53// If so, behave and style appropriately.

Callers 3

contextMenuReadOnlyMethod · 0.45
contextMenuMethod · 0.45
MakeToolbarMethod · 0.45

Calls 1

SetStateMethod · 0.95

Tested by

no test coverage detected