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.ToolbarAction"
widget.ToolbarAction
import "fyne.io/fyne/v2/widget"
Usage
type ToolbarAction
type ToolbarAction struct {
Icon fyne.Resource
OnActivated func() `json:"-"`
}
ToolbarAction is push button style of ToolbarItem
func NewToolbarAction
func NewToolbarAction(icon fyne.Resource, onActivated func()) *ToolbarAction
NewToolbarAction returns a new push button style ToolbarItem
func (*ToolbarAction) Disable
func (t *ToolbarAction) Disable()
Disable this ToolbarAction so that it cannot be interacted with, updating any style appropriately.
Since:
2.5
func (*ToolbarAction) Disabled
func (t *ToolbarAction) Disabled() bool
Disabled returns true if this ToolbarAction is currently disabled or false if it can currently be interacted with.
Since:
2.5
func (*ToolbarAction) Enable
func (t *ToolbarAction) Enable()
Enable this ToolbarAction, updating any style or features appropriately.
Since:
2.5
func (*ToolbarAction) SetIcon
func (t *ToolbarAction) SetIcon(icon fyne.Resource)
SetIcon updates the icon on a ToolbarItem
Since:
2.2
func (*ToolbarAction) ToolbarObject
func (t *ToolbarAction) ToolbarObject() fyne.CanvasObject
ToolbarObject gets a button to render this ToolbarAction