Documentation ¶
Index ¶
- Constants
- Variables
- func NewHeader(header Header) *tableRow
- func NewResizableLabel(s string, look *StyleObj, options ...ResizableLabelOption) *resizableLabel
- func NewTableBodyRow(id int, body []string, handler OnSelectionHandler, ...) *tableRow
- func NewTableHeaderRow(header []string, padding float32, handler headerOnTapHandler, ...) *tableRow
- type DoubleClickHandler
- type Header
- type Interface
- type LabelDraggingHandler
- type LabelTapHandler
- type MyTable
- func (t *MyTable) CreateRenderer() fyne.WidgetRenderer
- func (t *MyTable) CurrentSelections() (selections []bool)
- func (t *MyTable) FirstSelected() int
- func (t *MyTable) ScrollTo(id int)
- func (t *MyTable) Scrolled(evt *fyne.ScrollEvent)
- func (t *MyTable) SetData(d Interface)
- func (t *MyTable) SetSelection(rowid int, selected bool)
- func (t *MyTable) TypedKey(evt *fyne.KeyEvent)
- type OnSelectionHandler
- type Option
- type ResizableLabelOption
- type RowRender
- type StyleObj
- type TableRender
Constants ¶
View Source
const (
MaxFields = 100
)
Variables ¶
View Source
var ColumnWidth = make(map[int]float32) //SetColumnWidth(id int, width float32)
Functions ¶
func NewResizableLabel ¶
func NewResizableLabel(s string, look *StyleObj, options ...ResizableLabelOption) *resizableLabel
func NewTableBodyRow ¶
func NewTableBodyRow(id int, body []string, handler OnSelectionHandler, clickHandler DoubleClickHandler, arr []float32, look *StyleObj) *tableRow
Types ¶
type DoubleClickHandler ¶
type DoubleClickHandler func(id int)
type LabelDraggingHandler ¶
type LabelDraggingHandler func(d any, evt *fyne.DragEvent)
type LabelTapHandler ¶
type LabelTapHandler func(d any, evt *fyne.PointEvent)
type MyTable ¶
type MyTable struct { widget.BaseWidget // contains filtered or unexported fields }
func (*MyTable) CreateRenderer ¶
func (t *MyTable) CreateRenderer() fyne.WidgetRenderer
func (*MyTable) CurrentSelections ¶
CurrentSelections returns a slice of bool, one for each record; true if selected
func (*MyTable) FirstSelected ¶
FirstSelected returns record index in data.Rows() of first selected row; -1 if none is selected
func (*MyTable) Scrolled ¶
func (t *MyTable) Scrolled(evt *fyne.ScrollEvent)
Scrolled implment fyne.Scrollable interface (e.g. mouse wheel scrolling)
func (*MyTable) SetSelection ¶
SetSelection select the specified row if selected is true; unselect it otherwise; the rowid is the index of Interface.Item()
type OnSelectionHandler ¶
type Option ¶
type Option func(table *MyTable)
func WithBodyLook ¶
func WithDoubleClickHandler ¶
func WithDoubleClickHandler(h DoubleClickHandler) Option
WithDoubleClickHandler specifies h as a handler function gets called when a row is double clicked
func WithHeaderStyle ¶
func WithMultiSelections ¶
func WithMultiSelections() Option
func WithSelectionHandler ¶
func WithSelectionHandler(h OnSelectionHandler) Option
WithSelectionHandler specifies h as a handler function gets called when a row is selected
type ResizableLabelOption ¶
type ResizableLabelOption func(label *resizableLabel)
func WithDoubleTapHandler ¶
func WithDoubleTapHandler(h LabelTapHandler) ResizableLabelOption
func WithDraggingHandler ¶
func WithDraggingHandler(h LabelDraggingHandler) ResizableLabelOption
func WithMetaData ¶
func WithMetaData(d any) ResizableLabelOption
func WithTapHandler ¶
func WithTapHandler(h LabelTapHandler) ResizableLabelOption
type RowRender ¶
type RowRender struct {
// contains filtered or unexported fields
}
func (*RowRender) BackgroundColor ¶
type TableRender ¶
type TableRender struct {
// contains filtered or unexported fields
}
func (*TableRender) BackgroundColor ¶
func (r *TableRender) BackgroundColor() color.Color
func (*TableRender) Destroy ¶
func (r *TableRender) Destroy()
func (*TableRender) Layout ¶
func (r *TableRender) Layout(layoutsize fyne.Size)
func (*TableRender) MinSize ¶
func (r *TableRender) MinSize() fyne.Size
func (*TableRender) Objects ¶
func (r *TableRender) Objects() []fyne.CanvasObject
func (*TableRender) Refresh ¶
func (r *TableRender) Refresh()
Click to show internal directories.
Click to hide internal directories.