Problems with changeing slider start and end vlaues


I am trying to change slider start and end values with textInput.

div = Div(text="0", style={"font-size": "150%", "color": "white"})
slider = Slider(start=0, end=10, value=0, step=1, title="Slider")
text_input = TextInput(value="0", title="Start index")
        args=dict(text_input=text_input, div=div, slider=slider),
        const temp = text_input.value

show(row(text_input, div, slider))

Given code above works as intended, it changes the value of slider when I enter new value to text_input field.
Text div is just there to let me know if entered text value went through.
When I tried to change slider.start or slider.end it doesn’t update the slider.

Thanks in advance

Three slider values need to be numbers. You will need to convert the text value from the input.

I thought about that changing it to number but every time I changed it to integer and it didn’t work. But now I realized that float is also a number :slight_smile: and I worked with float.

slider.value also worked with text, that confused me alot.

1 Like