Scale#
- class ignis.widgets.Widget.Scale(*args: Any, **kwargs: Any)#
Bases: Gtk.Scale.
A slider widget.
- Properties:
vertical (
bool, optional, read-write): Whether the scale is vertical.min (
float, optional, read-write): Minimum value.max (
float, optional, read-write): Maximum value.step (
float, optional, read-write): Step increment.value (
float, optional, read-write): Current value.on_change (
Callable, optional, read-write): Function to call when the value changes.draw_value (
int, optional, read-write): Whether the current value is displayed.value_pos (
str, optional, read-write): Position where the current value is displayed. Works only ifdraw_valueis set toTrue. Default:"top".
- Value position:
"left"
"right"
"top"
"bottom"
Widget.Scale( vertical=False, min=0, max=100, step=1, value=20, on_change=lambda x: print(x.value), draw_value=True, value_pos='top' )