Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot get slider values to "Snap" to tick marks always(Resolved with Answer if anyone wants to know

KonradZuseNov 10 2013 — edited Nov 10 2013

Hello all,

Slider (JavaFX 2.2)

has a method called "snapToTicks" which I have set true both in my FXML document and within my IDE.  Now the thing is when I click on the slider it will go to the nearest tick mark; however when I drag my slider it slide normally.

I have 0-5 major ticks, 0 minor ticks, so it should be simple to snap to each of those, and if I add minor ticks it will snap to those.

I'm assuming that this is what this method is supposed to do, but is there a way to get it to snap when you slide it manually?

I also looked at block increment, but that doesn't seem to change anything? according to this it looks like the minor tick distance?

Thanks,

~KZ

This post has been answered by KonradZuse on Nov 10 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 8 2013
Added on Nov 10 2013
1 comment
1,370 views