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

Method CanFocus

core/flags.go:43–45  ·  view source on GitHub ↗

CanFocus returns whether this node can receive keyboard focus.

()

Source from the content-addressed store, hash-verified

41
42// CanFocus returns whether this node can receive keyboard focus.
43func (wb *WidgetBase) CanFocus() bool {
44 return wb.Styles.Abilities.HasFlag(abilities.Focusable)
45}
46
47// SetEnabled sets the [states.Disabled] flag to the opposite of the given value.
48func (wb *WidgetBase) SetEnabled(enabled bool) *WidgetBase {

Callers 3

RowGrabFocusMethod · 0.80
RowGrabFocusMethod · 0.80
childByLabelCanFocusFunction · 0.80

Calls 1

HasFlagMethod · 0.65

Tested by

no test coverage detected