On this page
widget.CheckGroup
import "fyne.io/fyne/v2/widget"Usage
type CheckGroup
type CheckGroup struct {
DisableableWidget
Horizontal bool
Required bool
OnChanged func([]string) `json:"-"`
Options []string
Selected []string
}CheckGroup widget has a list of text labels and checkbox icons next to each. Changing the selection (any number can be selected) will trigger the changed func.
Since:
2.1func NewCheckGroup
func NewCheckGroup(options []string, changed func([]string)) *CheckGroupNewCheckGroup creates a new check group widget with the set options and change handler
Since:
2.1func (*CheckGroup) Append
func (r *CheckGroup) Append(option string)Append adds a new option to the end of a CheckGroup widget.
func (*CheckGroup) CreateRenderer
func (r *CheckGroup) CreateRenderer() fyne.WidgetRendererCreateRenderer is a private method to Fyne which links this widget to its renderer
func (*CheckGroup) MinSize
func (r *CheckGroup) MinSize() fyne.SizeMinSize returns the size that this widget should not shrink below
func (*CheckGroup) Refresh
func (r *CheckGroup) Refresh()Refresh causes this widget to be redrawn in it’s current state.
func (*CheckGroup) Remove
func (r *CheckGroup) Remove(option string) boolRemove removes the first occurrence of the specified option found from a CheckGroup widget. Return true if an option was removed.
Since:
2.3func (*CheckGroup) SetSelected
func (r *CheckGroup) SetSelected(options []string)SetSelected sets the checked options, it can be used to set a default option.