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,
    enable_events = False,
    disabled = False,
    size = (None, None),
    font = None,
    background_color = None,
    text_color = None,
    key = None,
    k = None,
    pad = None,
    tooltip = None,
    visible = True,
    size_px = (None, None),
    metadata = None

Parameter Descriptions

Name Type Default Description
background_color str None color of slider's background
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
enable_events bool False If True then moving the slider will generate an Event
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
k str or int or tuple or object None Same as the Key. You can use either k or key. Which ever is set will be used.
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
metadata Any None User metadata that can be set to ANYTHING
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) 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 color of the slider's text
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
visible bool True set visibility state of the element

Class Properties

This class has no public properties

Class Methods

 def expand
 def get_stylesheet
 def set_stylesheet
 def update


WARNING - NOT USED IN PySimpleGUIQt port. Provided as dummy method

    expand_x = False,
    expand_y = False,
    expand_row = True

Parameter Descriptions

Name Type Default Description
expand_row bool True If True the row containing the element will also expand. Without this your element is "trapped" within the row
expand_x bool False If True Element will expand in the Horizontal directions
expand_y bool False If True Element will expand in the Vertical directions
RETURN None None


Returns the stylesheet for element's associated Qt Widget


Parameter Descriptions

Name Type Default Description
RETURN str stylesheet


Sets the stylesheet for a Qt Widget


Parameter Descriptions

Name Type Default Description
stylesheet str Stylesheet (string) to set stylesheet to


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.

If you change visibility, your element may MOVE.

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

Parameter Descriptions

Name Type Default Description
disabled bool None disable or enable state of the element
range (int, int), (float, float) (None, None) slider's range (min value, max value)
value int or float None sets current slider value
visible bool None control visibility of element