Question about slider tick marks

Hi All.

I have a strange issue going on here, and don’t know if it is me, Xojo 2025 R 2, or something else.

I have a slider, min 0 max 10, and have selected Tick Marks Top Left.

When I move the slider up, when I hit the tick marks, the value shows what it is supposed to; however, when I move it back down, it appears as if the value is no longer at the tick mark, it is on one side or the other.

Has anyone else had this issue?

Any resolution?

Regards

Can you share a sample project?
You can zip it and attach to your post.

@Michael_Cebasek ,

can you also show some screen shots and tell:

  • If a Desktop project the target OS and the OS you run
  • If a Web project, the Web browser used

That will help us provide better suggestions.

Hi Alberto and Gilles.
I have a very simple test project, however I am not sure how to share it.

If someone can tell me how, I will do it.

To answer the questions I can,

  1. It is a desktop project.

  2. I am running mac Sonoma, and using Xojo 2025 R 2 (until I get the money to upgrade :smiley: ).

The code doesn’t get any simpler than this: (I am doing the same thing in my project).

System.DebugLog "The value of the tick mark is : " + slider1.Value.ToString

This is my “official project code” which allows the user to move the slider, and see in a label what they have selected before "OK"ing it.

// show the value in the label for the RGB
windowSetAllTolerances.labelBrightnessToleranceView.text = SliderBrightnessTolerance.Value.ToString

// this makes it a double so that the value can be divided by 100 to make a decimal
app.brightnessToleranceAllowed = (SliderBrightnessTolerance.Value / 100)

// for testing only
System.DebugLog "The Brightness Value is : " + app.brightnessToleranceAllowed.ToString
windowSetAllTolerances.Refresh

thanks, both of you, for the responses.

Regards

Looks pretty normal here. I’m not sure what you mean by "it appears as if the value is no longer at the tick mark, it is on one side or the other"

slider

Zip your project and drag/drop to your post.
This forum accepts zip files.

You have a 1% resolution, so the displayed value will be “45” when the slider’s visual location (limited by screen resolution) is anywhere between 44.499999999 and 45.4999999999. If you want a tighter visual you’ll have to give your slider more resolution by setting its MaximumValue to 1,000, 10,000, etc., and implement scaling/rounding as needed.

Hello Ms. Truchesess.

Exactly.

I would go and click on the tick mark for “1” as an example, and see the debuglog ok. Then I would click on “2”, but NOTHING came out of the debuglog.

Then select “3” and it would register and show in the debuglog.

And if I was on the “3”, not having seen “2” in the log, and went back to “2”. Then it would show.

Getting irked, I would SLOWLY move the slider’s point back and I would be on either side of a tick mark before the log would show the number I passed.

Regards

Ok, Ms. Truchsess. That is an idea. I will try that and advise.

Thanks.

Here is the “project”… :smiley: I will also try what Ms Truchsess suggested and advise.

mySlider.zip (4.3 KB)

Hi Ms. Truchsess:

That seems to be helping a great deal. With a few more tweaks it might be something I can live with. Remember the old saying “When you making something user proof, they design a worse user.”

Regards

Actually I misspoke - Double.ToString doesn’t round, it truncates, so the correct statement would be

the displayed value will be “45” when the slider’s visual location (limited by screen resolution) is anywhere between 45.0000000 and 45.9999999999.

Thanks for the “correction”. :smiley:

I have been running more tests on an virgin slider program, so I think that this might be a bug for Xojo to look at or at least tell me if “yes, we know but that is the way it is”.

My only concern is: due to financial constraints I’m still on 2025R2, so I’m not sure where or if I can open a bug report.

Thanks for your time.

It is appreciated from all the respondants.