mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
widget: add SetChecked method to CheckBox
Signed-off-by: Alexander Arin <fralx@yandex.ru>
This commit is contained in:
committed by
Elias Naur
parent
1110ed1aed
commit
4ac3a7fd84
@@ -10,6 +10,10 @@ type CheckBox struct {
|
|||||||
checked bool
|
checked bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *CheckBox) SetChecked(value bool) {
|
||||||
|
c.checked = value
|
||||||
|
}
|
||||||
|
|
||||||
func (c *CheckBox) Checked(gtx *layout.Context) bool {
|
func (c *CheckBox) Checked(gtx *layout.Context) bool {
|
||||||
for _, e := range c.click.Events(gtx) {
|
for _, e := range c.click.Events(gtx) {
|
||||||
switch e.Type {
|
switch e.Type {
|
||||||
|
|||||||
Reference in New Issue
Block a user