Skip to content

Slider

Properties

  • enabled: (in bool): Defaults to true. You can’t interact with the slider if enabled is false.
  • has-focus: (out bool): Set to true when the slider currently has the focus
  • value (in-out float): The value. Defaults to the minimum.
  • minimum (in float): The minimum value (default: 0)
  • maximum (in float): The maximum value (default: 100)
  • orientation (in enum Orientation): If set to true the Slider is displayed vertical (default: horizontal).

Callbacks

  • changed(float): The value was changed
  • released(float): Invoked when the user completed changing the slider’s value, i.e. when the press on the knob was released or the arrow keys lifted.

Example

import { Slider } from "std-widgets.slint";
export component Example inherits Window {
width: 200px;
height: 25px;
Slider {
width: parent.width;
height: parent.height;
value: 42;
}
}