Jump to content

NumCtrl with warp around


Recommended Posts

Hi there,

is it possible to set up a NumCtrl with a "wrap around". If I reach the maximum value and I press "up" again I want it to jump to the minimum number and vice versa.

E.g. (pressing up again and again)

0 1 2 3 4 5 0 1 3 4 5

or (pressing down...)

5 4 3 2 1 0 5 4 3 2 1

Edited by werner
Link to comment

Hi there,

is it possible to set up a NumCtrl with a "wrap around". If I reach the maximum value and I press "up" again I want it to jump to the minimum number and vice versa.

E.g. (pressing up again and again)

0 1 2 3 4 5 0 1 3 4 5

or (pressing down...)

5 4 3 2 1 0 5 4 3 2 1

If you have a limited and well defined number of possibilities (0-5 for example), you could use a text-ring control. You have to set the strings values from 0 to 6 and then it will go in circle when you increment or decrement. If you have a huge set of possibilities (or infinite), don't try that. jcarmody's solution is what you need.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.