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