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.Accordion"
widget.Accordion
import "fyne.io/fyne/v2/widget"
Usage
type Accordion
type Accordion struct {
BaseWidget
Items []*AccordionItem
MultiOpen bool
}
Accordion displays a list of AccordionItems. Each item is represented by a button that reveals a detailed view when tapped.
func NewAccordion
func NewAccordion(items ...*AccordionItem) *Accordion
NewAccordion creates a new accordion widget.
func (*Accordion) Append
func (a *Accordion) Append(item *AccordionItem)
Append adds the given item to this Accordion.
func (*Accordion) Close
func (a *Accordion) Close(index int)
Close collapses the item at the given index.
func (*Accordion) CloseAll
func (a *Accordion) CloseAll()
CloseAll collapses all items.
func (*Accordion) CreateRenderer
func (a *Accordion) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*Accordion) MinSize
func (a *Accordion) MinSize() fyne.Size
MinSize returns the size that this widget should not shrink below.
func (*Accordion) Open
func (a *Accordion) Open(index int)
Open expands the item at the given index.
func (*Accordion) OpenAll
func (a *Accordion) OpenAll()
OpenAll expands all items.
func (*Accordion) Remove
func (a *Accordion) Remove(item *AccordionItem)
Remove deletes the given item from this Accordion.
func (*Accordion) RemoveIndex
func (a *Accordion) RemoveIndex(index int)
RemoveIndex deletes the item at the given index from this Accordion.