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

Method SetReadOnly

core/flags.go:66–68  ·  view source on GitHub ↗

SetReadOnly sets the [states.ReadOnly] flag to the given value.

(ro bool)

Source from the content-addressed store, hash-verified

64
65// SetReadOnly sets the [states.ReadOnly] flag to the given value.
66func (wb *WidgetBase) SetReadOnly(ro bool) *WidgetBase {
67 return wb.SetState(ro, states.ReadOnly)
68}
69
70// HasStateWithin returns whether this widget or any
71// of its children have the given state flag.

Callers 15

TestTableReadOnlyFunction · 0.45
TestKeyedListReadOnlyFunction · 0.45
showReturnsDialogMethod · 0.45
editNodeMethod · 0.45
makeFilesRowMethod · 0.45
InitMethod · 0.45
MakeRowMethod · 0.45
editIndexMethod · 0.45
TestListReadOnlyFunction · 0.45
InitMethod · 0.45
MakeToolbarMethod · 0.45
InitMethod · 0.45

Calls 1

SetStateMethod · 0.95

Tested by 5

TestTableReadOnlyFunction · 0.36
TestKeyedListReadOnlyFunction · 0.36
TestListReadOnlyFunction · 0.36
TestFormReadOnlyFunction · 0.36
TestTreeReadOnlyFunction · 0.36