Skip to content

Note

Click here to download the full example code

Range slider widget#

A double ended range slider widget.

range slider

Out:

<FunctionGui func(range_value: tuple[int, int] = (20, 380))>


from magicgui import magicgui


@magicgui(auto_call=True, range_value={"widget_type": "RangeSlider", "max": 500})
def func(range_value: tuple[int, int] = (20, 380)):
    """Double ended range slider."""
    print(range_value)


func.show(run=True)

Total running time of the script: ( 0 minutes 0.039 seconds)

Download Python source code: range_slider.py

Download Jupyter notebook: range_slider.ipynb

Gallery generated by mkdocs-gallery