widget.Slider
import "fyne.io/fyne/v2/widget"Usage
type Slider
type Slider struct {
	BaseWidget
	Value float64
	Min   float64
	Max   float64
	Step  float64
	Orientation Orientation
	OnChanged   func(float64) `json:"-"`
	// Since: 2.4
	OnChangeEnded func(float64) `json:"-"`
}Slider is a widget that can slide between two fixed values.
func NewSlider
func NewSlider(min, max float64) *SliderNewSlider returns a basic slider.
func NewSliderWithData
func NewSliderWithData(min, max float64, data binding.Float) *SliderNewSliderWithData returns a slider connected with the specified data source.
2.0func (*Slider) Bind
func (s *Slider) Bind(data binding.Float)Bind connects the specified data source to this Slider. The current value will be displayed and any changes in the data will cause the widget to update. User interactions with this Slider will set the value into the data source.
2.0func (*Slider) CreateRenderer
func (s *Slider) CreateRenderer() fyne.WidgetRendererCreateRenderer links this widget to its renderer.
func (*Slider) Disable
func (s *Slider) Disable()Disable disables the slider
2.5func (*Slider) Disabled
func (s *Slider) Disabled() boolDisabled returns true if the slider is currently disabled
2.5func (*Slider) DragEnd
func (s *Slider) DragEnd()DragEnd is called when the drag ends.
func (*Slider) Dragged
func (s *Slider) Dragged(e *fyne.DragEvent)Dragged is called when a drag event occurs.
func (*Slider) Enable
func (s *Slider) Enable()Enable enables the slider
2.5func (*Slider) FocusGained
func (s *Slider) FocusGained()FocusGained is called when this item gained the focus.
2.4func (*Slider) FocusLost
func (s *Slider) FocusLost()FocusLost is called when this item lost the focus.
2.4func (*Slider) MinSize
func (s *Slider) MinSize() fyne.SizeMinSize returns the size that this widget should not shrink below
func (*Slider) MouseIn
func (s *Slider) MouseIn(_ *desktop.MouseEvent)MouseIn is called when a desktop pointer enters the widget.
2.4func (*Slider) MouseMoved
func (s *Slider) MouseMoved(_ *desktop.MouseEvent)MouseMoved is called when a desktop pointer hovers over the widget.
2.4func (*Slider) MouseOut
func (s *Slider) MouseOut()MouseOut is called when a desktop pointer exits the widget
2.4func (*Slider) SetValue
func (s *Slider) SetValue(value float64)SetValue updates the value of the slider and clamps the value to be within the range.
func (*Slider) Tapped
func (s *Slider) Tapped(e *fyne.PointEvent)Tapped is called when a pointer tapped event is captured.
2.4func (*Slider) TypedKey
func (s *Slider) TypedKey(key *fyne.KeyEvent)TypedKey is called when this item receives a key event.
2.4func (*Slider) TypedRune
func (s *Slider) TypedRune(_ rune)TypedRune is called when this item receives a char event.
2.4func (*Slider) Unbind
func (s *Slider) Unbind()Unbind disconnects any configured data source from this Slider. The current value will remain at the last value of the data source.
2.0