Jump to content

Ring Control upper/lower end


Stocki

Recommended Posts

Hi,

I use ring controls with the following items.

String / Value (example)

+ 10 V / 5

+ 5 V / 4

+1 V / 3

-1 V / 2

- 5 V / 1

-10 V / 0

Now I don't want the ring to jump from + 10 V to - 10 V when one hits the upper arrow while at the + 10 V item position and vise versa (down arrow at - 10 V jumps to + 10 V).

The ring must ignore the event at the upper/lower end! Is there any option? Other controls to handle this?

Important to me is that this control has the up/down arrows and the values should be numeric not strings.

Thank you.

Stocki

Link to comment

The stock controls don't have the capability you're looking for. Other options:

  • trap the value change event, and if you see the "rollaround", change the value back.
  • Hide the up/down arrows and place your own buttons on there to increment/decrement the value

I am, of course, assuming you're using an event structure.

  • Like 2
Link to comment

Have you looked at using the "Key Down?" event?

Yes thats another action! Key is not Mouse. When there is key focus on the control i handle this with the Key Down? filter event and it works perfect. But Mouse down is different. You don't get the information if one hit the up/down arrow, thus you can't filter this like with key down?

The stock controls don't have the capability you're looking for. Other options:

  • trap the value change event, and if you see the "rollaround", change the value back.
  • Hide the up/down arrows and place your own buttons on there to increment/decrement the value

I am, of course, assuming you're using an event structure.

Yes of course I do use the event structure. I tried the rollaround thing but there is one major bug in this idea. What if one, selecting from the list that comes up when u hit the ring control, wants to select the last item while the current selection is at the first item?! Then this trap won't let the user select the last item and vice versa. And I have no idea how to handle this.

Second idea is possible but i have like more than 100 rings in my applications and I have to support like 20-30 applications all over. I don't like the idea to have additional 200 up/down controls in my app just for this little feature. I mean you can enter limits and coerce them. But it seems to be a problem for NI to implement this feature to stop at the lower/upper end, or they just don't see the needs to implement this to LV.

Best regards

Stocki

Link to comment

If you have that many instances of this behavior it would be worth your time to create an Xcontrol.

Second this idea. You could definitely make an xcontrol do what you want. Xcontrols are usually a pain, but if you've got that many of them... The first thing I would ask myself is how important is this "feature"? My inclination would be for the end user to just deal with it and ok maybe it's not that intuitive, but it's a lot easier than writing an xcontrol. Then again if they want it bad enough and are willing to pay for it...

Link to comment
  • 2 weeks later...
If you were to swap to using Menu Rings instead of Text Rings, you could avoid this problem altogether because the menu ring doesn't have up/down controls.

That's not fixing my problem! As I said, I need the increment/decrement.

Second this idea. You could definitely make an xcontrol do what you want. Xcontrols are usually a pain, but if you've got that many of them... The first thing I would ask myself is how important is this "feature"? My inclination would be for the end user to just deal with it and ok maybe it's not that intuitive, but it's a lot easier than writing an xcontrol. Then again if they want it bad enough and are willing to pay for it...

I never looked into the xcontrols. Maybe I should. So far, I can see that there is no easy way to handle this little problem isn't it?!

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.