Upgrade to v2.5
Fyne API v2.5
app
canvas
container
data/binding
data/validation
dialog
driver
driver/desktop
driver/mobile
driver/software
lang
layout
storage
storage/repository
test
theme
widget
package widget
Accordion
AccordionItem
Activity
BaseWidget
Button
ButtonAlign
ButtonIconPlacement
ButtonImportance
ButtonStyle
Card
Check
CheckGroup
CustomTextGridStyle
DisableableWidget
Entry
FileIcon
Form
FormItem
GridWrap
GridWrapItemID
Hyperlink
HyperlinkSegment
Icon
ImageSegment
Importance
Label
List
ListItemID
ListSegment
Menu
Orientation
ParagraphSegment
PopUp
PopUpMenu
ProgressBar
ProgressBarInfinite
RadioGroup
RichText
RichTextBlock
RichTextSegment
RichTextStyle
Select
SelectEntry
Separator
SeparatorSegment
Slider
Table
TableCellID
TextGrid
TextGridCell
TextGridRow
TextGridStyle
TextSegment
Toolbar
ToolbarAction
ToolbarItem
ToolbarSeparator
ToolbarSpacer
Tree
TreeNodeID
Fyne API "widget.RadioGroup"
widget.RadioGroup
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.