Documentation ¶
Index ¶
Constants ¶
View Source
const ( BarWidth = 20 //竖滚动条宽度 BarHeight = 50 //竖滚动条高度 )
View Source
const OffsetResolution = 100
OffsetResolution indicate max value of the scroll offset
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OffsetChangeHandler ¶
type OffsetChangeHandler func(newoffset uint32)
OffsetChangeHandler is the type handler function get called whenever scroller offset changes
type ScrollBar ¶
type ScrollBar struct { widget.BaseWidget // contains filtered or unexported fields }
ScrollBar is the fyne widget for scroll bar
func NewSBar ¶
func NewSBar(handler OffsetChangeHandler, h bool) *ScrollBar
NewSBar returns a new scrollbar instance, with the specified handler function handler, could be nil; horizontal scrollbar if h is true, vertical otherwise;
func (*ScrollBar) CreateRenderer ¶
func (sbar *ScrollBar) CreateRenderer() fyne.WidgetRenderer
CreateRenderer implments fyne.Widget interface
func (*ScrollBar) DragEnd ¶
func (sbar *ScrollBar) DragEnd()
DragEnd implements fyne.Draggable interface
func (*ScrollBar) Dragged ¶
func (sbar *ScrollBar) Dragged(evt *fyne.DragEvent)
Dragged implements fyne.Draggable interface
func (*ScrollBar) IsHorizontal ¶
IsHorizontal returns true if it is horizontal scroll bar
Click to show internal directories.
Click to hide internal directories.