Slider Range Changing #1010
-
How is one expected to change the slider range values after construction of the Slider, or is the current method essentially to destroy and reconstruct a new slider whenever you want the range to be changed? Expanding on this, how are we expected to set the value of the Slider rather than solely rely on user input? Usecase:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Slider's As for "without having to recreate", all widgets are essentially objects that get created during |
Beta Was this translation helpful? Give feedback.
Slider's
new
method takes arange
and avalue
(https://github.com/hecrj/iced/blob/master/native/src/widget/slider.rs#L67), so you can do all of the things you said. Using an "external input" would basically be just storing it in your state and passing it viavalue
. Same for changing therange
.As for "without having to recreate", all widgets are essentially objects that get created during
view
method and are consumed, so i'm not sure what you mean by that.