Documentation
¶
Index ¶
- type CellType
- type DataCell
- type FlexTable
- type Header
- type TableCell
- type TableData
- func (td *TableData) AddColumnFromTable(newColumnName, oldColumnName string, otherTable *TableData) error
- func (td *TableData) AddStringCell(column string, value string)
- func (td *TableData) AddStringRow(columns []string, row []string)
- func (td *TableData) Clear()
- func (td *TableData) ColumnCount() int
- func (td *TableData) Get(col, row int) string
- func (td *TableData) GetColumn(columnName string) []DataCell
- func (td *TableData) GetFromColumn(column string, row int) string
- func (td *TableData) GetRows(column string) []DataCell
- func (td *TableData) InsertStringCell(column string, row int, value string)
- func (td *TableData) RenameColumn(oldName, newName string)
- func (td *TableData) RowCount() int
- func (td *TableData) SetIds(ids []string) error
- func (td *TableData) Sort(column string, ascending bool)
- type TableWidget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlexTable ¶
type FlexTable struct {
widget.BaseWidget
OnClick func(cell *TableCell)
OnClickSecondary func(cell *TableCell)
SelectionColor color.Color
CellBgColor color.Color
CellBgColorAlt color.Color
// contains filtered or unexported fields
}
func NewFlexTable ¶
func (*FlexTable) CreateRenderer ¶
func (t *FlexTable) CreateRenderer() fyne.WidgetRenderer
func (*FlexTable) SetColumnWidth ¶
type Header ¶
type Header struct {
TableCell
// contains filtered or unexported fields
}
func (*Header) CreateRenderer ¶
func (h *Header) CreateRenderer() fyne.WidgetRenderer
func (*Header) RefreshSortIcon ¶
func (h *Header) RefreshSortIcon()
func (*Header) Tapped ¶
func (h *Header) Tapped(_ *fyne.PointEvent)
type TableCell ¶
type TableCell struct {
widget.BaseWidget
Id widget.TableCellID
// contains filtered or unexported fields
}
func (*TableCell) ColumnName ¶
func (*TableCell) CreateRenderer ¶
func (c *TableCell) CreateRenderer() fyne.WidgetRenderer
func (*TableCell) Tapped ¶
func (c *TableCell) Tapped(_ *fyne.PointEvent)
func (*TableCell) TappedSecondary ¶
func (c *TableCell) TappedSecondary(_ *fyne.PointEvent)
type TableData ¶
type TableData struct {
TableName string
TableId string
Columns []string // Used to save the order of columns
RowIds []string
RowCategory string
// contains filtered or unexported fields
}
func NewTableData ¶
func (*TableData) AddColumnFromTable ¶
func (*TableData) AddStringCell ¶
func (*TableData) AddStringRow ¶
func (*TableData) ColumnCount ¶
func (*TableData) InsertStringCell ¶
func (*TableData) RenameColumn ¶
type TableWidget ¶
type TableWidget struct {
Instance *fyne.Container
Title string
RowCount func() int
Data func(offset, limit int) *TableData
Offset int
Limit int // this is currently not used. Offset for fetching data is pageSize
// contains filtered or unexported fields
}
func NewTableWidget ¶
func NewTableWidget(title string, pageSize int) *TableWidget
func (*TableWidget) ExportToExcel ¶
func (ctx *TableWidget) ExportToExcel(data *TableData, columns []string, path string) error
func (*TableWidget) Refresh ¶
func (ctx *TableWidget) Refresh()
func (*TableWidget) SetColumnWidth ¶
func (ctx *TableWidget) SetColumnWidth(id int, width float32)
func (*TableWidget) SetOnClick ¶
func (ctx *TableWidget) SetOnClick(onClick func(row, col int))
Click to show internal directories.
Click to hide internal directories.