Weird behavior of slider

Hi everyboy, I've found this situation with my apps in a recent update:

I use an slider to change the size of text in some components, and I've defined the maxvalue, minvalue and thumbposition, based on the text size previous calculated, so it always have the same distance from thumbposition to maxvalue, and to minvalue.

The point is that I updated the app, whitout no changes on the slider values, and now is not working as previously; what I have observed is that it takes the limits defined in the designer as a reference, and then apply the criteria I determined in the blocks. If I change the designer parameters, the values of the slider changes, no matter that what I set on the blocks is no changing.

Here are the values of designer and blocks I use, none of them has changed, but the results on the screen are different.

Any idea?


Screen before the update:

Screen after the update:

How many steps do you want between 15 and 35 ? (100 or 20)

Here is an example aia, what would you have different ?

sliderButtonSize.aia (2.0 KB)

image

@TIMAI2, thank you for your response. The point is that I don't want to use the data of designer, but what I declared in blocks.

In this case, I never changed the value of steps before, and it works; I tested now by changing this value, defined it in blocks as (maxvalue - minvalue), but the result is the same.

Regards.

What is the value of global FS ?

You multiply by 2.1, will this return a fontsize OK ? Will this return a thumb position if steps are in 1s ?

Will the thumbposition always be within the bounds of the max/min values ?

Why ? ( I am feeling a little dense today...)

Hi @TIMAI2, thanks for following.

The value of FS, depends on the screen size, so could take any value.
I multiply it by 2.1 in this screen, just to increase the thumbposition, but in other screens I need a diferent factor, because of the size of the slider in them.
Yes, what I'm looking for, is that the thumbposition always be in the middle of its bounds when the screen starts, because from there, I move the textsize in buttons, by sliderchangeposition.

An example:
If FS = 20, thumbposition will be 42 (FSx2.1), maxvalue=82 (42 [thumbposition] + 40 [FSx2]), and minvalue=2 (42 [thumbposition] - 40 [FSx2]), so, the thumbposition will be in the middle of its bounds.
If you change the FS value to, lets say 35, values will be TP=73.5, Max:143.5 y Min:3.5, and the TP still remains in the middle.

This works fine, before I update the app.

What do you think?

Still begs the question why are you doing this ? (it is not obvious from your screenshots as to which buttons are having their fontsize changed ?) Is this simply a relative sizing exercise, depending on the device being used ?

Correct, depending on the device, I define a base font (FS), and then allow the user to increase the size of the numbers of the 75 balls, by moving the slider left or right.

The balls are buttons with a background image, and a text number, as you can see in the images I sent previously.

Using the file prepared by @TIMAI2 (thank you), I add the blocks I'm using and compared them with the formulas implied, to compare results and visualize the diferences.

Here are the images and de *.aia file.

sliderButtonSize.aia (3.3 KB)


Curiously, if I change the slider.ThumbPosition component from de formula, by the calculation blocks, max and min values are correct, but the thumposition remains incorrect.


Apparently, the problem is with slider.XXXX components calculations..., or I'm definitely doing something wrong.

Regards

Try setting the thumbposition AFTER you set the MAX & MIN values ?

It works, but only if I use formulas; if I use the slider.thumbposition, does not work, since it is not previous determined and is used as a part of the formula. I supouse that uses the value set on designer.

As a complementary excercise, if I change values of any of this components in the designer, the values change again.

I'm going to use formulas and the thumbposition after max and min, as a workaround to mis apps, but I think there something to check with slider properties/components.

Thanks for your help, @TIMAI2 !

Regards

Try this (updated set min to @12):

Ok, I'll try.

Thank you @TIMAI2