Documentation
¶
Overview ¶
Package datatable provides a data-driven table widget for the Fyne GUI toolkit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct { // Alignment defines the alignment of the data in a column. Alignment Alignment // Title is the title displayed in the header of a column. Title string // Widths sets the width of a column. // // A column with width 0 will be auto-sized to fit the data in that column. // The minimum width is the width needed to fit a column's title. Width float32 }
A Column configures a column.
type Config ¶
type Config struct { // Columns configures the columns of the table. Columns []Column // MANDATORY FooterHidden bool // Whether to hide the header. HeaderHidden bool // Whether to hide the search bar. SearchBarHidden bool // Initially sorted column SortedColumnIndex int // Initial sort direction SortedColumnDirection SortDir }
A Config configures a DataTable widget. All fields except for Columns are optional.
type DataTable ¶
type DataTable struct { // Callback runs when an entry is selected. // index refers to the row in the original data. OnSelected func(index int) widget.BaseWidget // contains filtered or unexported fields }
A DataTable is a Fyne widget implementing a data-driven table. It's public API is safe for concurrent use by multiple goroutines.
func New ¶
New returns a new DataTable widget. The widgets is configured with a Config struct. Returns an error if the validation of the config value failed.
func (*DataTable) CreateRenderer ¶
func (w *DataTable) CreateRenderer() fyne.WidgetRenderer
Click to show internal directories.
Click to hide internal directories.