Predefine a slider value

Hi there,
how can I predefine a slider thumb position immediatly?
Difficult to explain:
I have a slider defined and want to predefine his thumb position to a value. I do that with
<set "slider"."ThumbPosition" to> get a global value

The global value is defined first (before the changing slider routine is performed). This works. The slider moves to the desired position but not in one hop. There are different hop steps between each movement.

The problem is now: I use <When .positionChanged to get the changed slider position afterwards:


This value is send via BT to an arduino and updates the global position Value either.

As the slider makes the above mentioned hops, the position is not send in once to the arduino but in more portions. This results in deviations of the value.

Hope someone can help me in this issue. I want the slider to start in the desired position befor opening the dialog with the slider.
I did not found out howto upload the code snippets better...
Regards

This slider problem can be avoided in a few different ways:

  • Add a Button to the Slider next to it in a Horizontal Arrangement, with the last thumb value in its .Text, updated by the Slider, and left disabled until the Slider thumb moves. Move the transmitting code to the Button Click event. Disable the Button after transmitting the code.
  • Switch to a List Picker
  • Switch to a Canvas, drawing a bar during drags, transmitting on TouchUp.
1 Like

the buildin Slider have an issue, it can not tell the change is from codes, or by user sliding.
if this is a problem for you, you can use an extension slidertools

1 Like

Thanks a lot,
I will give your suggestions a try!