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

Method IsReadOnly

core/flags.go:61–63  ·  view source on GitHub ↗

IsReadOnly returns whether this node is flagged as [ReadOnly] or [Disabled]. If so, behave appropriately. Styling is based on each state separately, but behaviors are often the same for both of these states.

()

Source from the content-addressed store, hash-verified

59// If so, behave appropriately. Styling is based on each state separately,
60// but behaviors are often the same for both of these states.
61func (wb *WidgetBase) IsReadOnly() bool {
62 return wb.StateIs(states.ReadOnly) || wb.StateIs(states.Disabled)
63}
64
65// SetReadOnly sets the [states.ReadOnly] flag to the given value.
66func (wb *WidgetBase) SetReadOnly(ro bool) *WidgetBase {

Callers 15

handleWidgetClickMethod · 0.95
InitMethod · 0.45
MakeToolbarMethod · 0.45
InitMethod · 0.45
SetIndexViewMethod · 0.45
MakeRowMethod · 0.45
InitValueButtonFunction · 0.45
InitMethod · 0.45
InitMethod · 0.45
editNodeMethod · 0.45
InitMethod · 0.45
rootIsReadOnlyMethod · 0.45

Calls 1

StateIsMethod · 0.95

Tested by

no test coverage detected