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

Method SetChecked

core/switch.go:224–228  ·  view source on GitHub ↗

SetChecked sets whether the switch it checked.

(on bool)

Source from the content-addressed store, hash-verified

222
223// SetChecked sets whether the switch it checked.
224func (sw *Switch) SetChecked(on bool) *Switch {
225 sw.SetState(on, states.Checked)
226 sw.SetState(false, states.Indeterminate)
227 return sw
228}
229
230// updateStackTop updates the [Frame.StackTop] of the stack in the switch
231// according to the current icon. It is called automatically to keep the

Callers 9

SetWidgetValueMethod · 0.95
InitMethod · 0.95
makeToolbarMethod · 0.80
setAllColumnsMethod · 0.80
setColumnsByNameMethod · 0.80
makeColumnsMethod · 0.80
TestSwitchChipCheckedFunction · 0.80
InitMethod · 0.80
QReplacePromptMethod · 0.80

Calls 1

SetStateMethod · 0.45

Tested by 1

TestSwitchChipCheckedFunction · 0.64