slider
Used to enter numbers, from a specific range of numbers set by the kwargs minimum
and maximum
Initializing
Same as others, pass the tinyPillow object as the first argument.
You must also pass a caption, this will be shown below the slider.
You can also pass a minimum and maximum value, aswell as a starting value
slider = tpil.gui.slider(tpil, "Slider Value", minimum=5, maximum=25, start=15)
Usage
Call the .draw()
function. This is blocking, and it returns the value the user entered.
value = slider.draw()
Last updated