import "fyne.io/fyne/v2/widget"
  

Usage

type RadioGroup

  type RadioGroup struct {
	DisableableWidget
	Horizontal bool
	Required   bool
	OnChanged  func(string) `json:"-"`
	Options    []string
	Selected   string
}
  

RadioGroup widget has a list of text labels and checks check icons next to each. Changing the selection (only one can be selected) will trigger the changed func.

Since: 1.4

func NewRadioGroup

  func NewRadioGroup(options []string, changed func(string)) *RadioGroup
  

NewRadioGroup creates a new radio group widget with the set options and change handler

Since: 1.4

func (*RadioGroup) Append

  func (r *RadioGroup) Append(option string)
  

Append adds a new option to the end of a RadioGroup widget.

func (*RadioGroup) CreateRenderer

  func (r *RadioGroup) CreateRenderer() fyne.WidgetRenderer
  

CreateRenderer is a private method to Fyne which links this widget to its renderer

func (*RadioGroup) MinSize

  func (r *RadioGroup) MinSize() fyne.Size
  

MinSize returns the size that this widget should not shrink below

func (*RadioGroup) Refresh

  func (r *RadioGroup) Refresh()
  

func (*RadioGroup) SetSelected

  func (r *RadioGroup) SetSelected(option string)
  

SetSelected sets the radio option, it can be used to set a default option.