Jump to content
kaarigar

TArcDial behavior

Recommended Posts

I am in need of a rotary dial control to let user choose some alphabetical values. Basically, I need a user to rotate the dial to choose a letter from alphabet. I am using TArcDial and it does its job with the help of Tracking := True, and setting appropriate ValueRange property, user can smoothly turn the dial and select an alphabet letter. However, it has one strange behavior. Whenever the ArcDial is clicked or touched (on mobile device), the Arc Dial value changes its value to where it was clicked or touched. (You can see this behavior in the ActionsDemo sample.) This results in an annoying behavior that whenever user touches the dial, the alphabet jumps from its current value to another value which is not sequentially next or previous letter. Perhaps this is by design, but my questions is is there a way to work around this, or is there a better way of doing what I want to achieve? Thank you!

Share this post


Link to post

I would capture from the TArcDial only the change (OnChange) and its direction in relation to the last value and program the rest myself. The first change after MouseDown I would discard, so that it comes to no spontaneous jumps of your display and use this value as start value.

  • Like 1

Share this post


Link to post

Thanks for your suggestion. I couldn't really figure out how to ignore (or discard) the first change after MouseDown event - the TArcDial jumps to the new angle right away. Instead I was able to implement this suggested logic on TImageControl and rotate the image as desired. This is very light weight with just a few lines of code and does what I need. Thanks!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×