On this page
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.4func NewCard
func NewCard(title, subtitle string, content fyne.CanvasObject) *CardNewCard creates a new card widget with the specified title, subtitle and content (all optional).
Since:
1.4func (*Card) CreateRenderer
func (c *Card) CreateRenderer() fyne.WidgetRendererCreateRenderer is a private method to Fyne which links this widget to its renderer
func (*Card) MinSize
func (c *Card) MinSize() fyne.SizeMinSize 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.