Fyne API "widget.Slider"

widget.Slider


import "fyne.io/fyne/widget"

Usage

type Slider

type Slider struct {
	BaseWidget

	Value float64
	Min   float64
	Max   float64
	Step  float64

	Orientation Orientation
	OnChanged   func(float64)
}

Slider is a widget that can slide between two fixed values.

func NewSlider

func NewSlider(min, max float64) *Slider

NewSlider returns a basic slider.

func (*Slider) CreateRenderer

func (s *Slider) CreateRenderer() fyne.WidgetRenderer

CreateRenderer links this widget to its renderer.

func (*Slider) DragEnd

func (s *Slider) DragEnd()

DragEnd function.

func (*Slider) Dragged

func (s *Slider) Dragged(e *fyne.DragEvent)

Dragged function.

func (*Slider) MinSize

func (s *Slider) MinSize() fyne.Size

MinSize returns the size that this widget should not shrink below

func (*Slider) SetValue

func (s *Slider) SetValue(value float64)

SetValue updates the value of the slider and clamps the value to be within the range.