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

Method SetSelected

core/flags.go:36–40  ·  view source on GitHub ↗

SetSelected sets the [states.Selected] flag to given value for the entire Widget and calls [WidgetBase.Restyle] to apply any resultant style changes.

(sel bool)

Source from the content-addressed store, hash-verified

34// SetSelected sets the [states.Selected] flag to given value for the entire Widget
35// and calls [WidgetBase.Restyle] to apply any resultant style changes.
36func (wb *WidgetBase) SetSelected(sel bool) *WidgetBase {
37 wb.SetState(sel, states.Selected)
38 wb.Restyle()
39 return wb
40}
41
42// CanFocus returns whether this node can receive keyboard focus.
43func (wb *WidgetBase) CanFocus() bool {

Callers 13

MakeRowMethod · 0.45
NewMenuFromStringsFunction · 0.45
SelectMethod · 0.45
UnselectMethod · 0.45
UnselectAllMethod · 0.45
InitMethod · 0.45
MakeRowMethod · 0.45
makeItemsMenuMethod · 0.45
insertTabOnlyAtMethod · 0.45
SelectTabIndexMethod · 0.45
unselectOtherTabsMethod · 0.45
MakeRowMethod · 0.45

Calls 2

SetStateMethod · 0.95
RestyleMethod · 0.95

Tested by

no test coverage detected