Web Analytics Made Easy - Statcounter
Skip to content


A slider, horizontal or vertical

    range = (None, None),
    default_value = None,
    resolution = None,
    tick_interval = None,
    orientation = None,
    border_width = None,
    relief = None,
    change_submits = False,
    disabled = False,
    size = (None, None),
    size_px = (None, None),
    font = None,
    background_color = None,
    text_color = None,
    key = None,
    pad = None,
    tooltip = None

Parameter Descriptions

Name Type Default Description
background_color str None color of background. Can be in #RRGGBB format or a color name "black"
border_width int None width of border around element in pixels
change_submits bool False * DEPRICATED DO NOT USE. Use enable_events instead
default_value int or float None starting value for the slider
disabled bool False set disable state for element
font (str or (str, int[, str]) or None) None specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
key str or int or tuple or object None Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window
orientation str None 'horizontal' or 'vertical' ('h' or 'v' also work)
pad (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int None Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int)
range (int, int) or Tuple[float, float] (None, None) slider's range (min value, max value)
resolution int or float None the smallest amount the slider can be moved
size (int, int) (None, None) (l=length chars/rows, w=width pixels)
size_px (int, int) or (None, None) (None, None) w=pixels-wide, h=pixels-high
text_color str None element's text color. Can be in #RRGGBB format or a color name "black"
tick_interval int or float None how often a visible tick should be shown next to slider
tooltip str None text, that will appear when mouse hovers over the element

Class Properties

This class has no public properties

Class Methods

 def update


Changes some of the settings for the Slider Element. Must call Window.Read or Window.Finalize prior

Changes will not be visible in your window until you call window.read or window.refresh.

    value = None,
    range = (None, None),
    disabled = None

Parameter Descriptions

Name Type Default Description
disabled bool None disable or enable state of the element
range (int, int) or Tuple[float, float (None, None) Sets a new range for slider
value int or float None sets current slider value