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.Card"
widget.Card
import "fyne.io/fyne/v2/widget"
Usage
type Card
type Card struct {
BaseWidget
Title, Subtitle string
Image *canvas.Image
Content fyne.CanvasObject
}
Card widget groups title, subtitle with content and a header image
Since:
1.4
func NewCard
func NewCard(title, subtitle string, content fyne.CanvasObject) *Card
NewCard creates a new card widget with the specified title, subtitle and content (all optional).
Since:
1.4
func (*Card) CreateRenderer
func (c *Card) CreateRenderer() fyne.WidgetRenderer
CreateRenderer is a private method to Fyne which links this widget to its renderer
func (*Card) MinSize
func (c *Card) MinSize() fyne.Size
MinSize returns the size that this widget should not shrink below
func (*Card) SetContent
func (c *Card) SetContent(obj fyne.CanvasObject)
SetContent changes the body of this card to have the specified content.
func (*Card) SetImage
func (c *Card) SetImage(img *canvas.Image)
SetImage changes the image displayed above the title for this card.
func (*Card) SetSubTitle
func (c *Card) SetSubTitle(text string)
SetSubTitle updates the secondary title for this card.
func (*Card) SetTitle
func (c *Card) SetTitle(text string)
SetTitle updates the main title for this card.