Jump to content

Firing event with menu rings


PA-Paul

Recommended Posts

Hi All,

I have a bit of code (LV 8.6) which populates a menu ring based on the contents of a directory. I want the user to be able to select from the menu and in doing so trigger an event (within an event structure). So, I set up a "value change" event on the menu ring and basically it works. However, sometimes there may only be one item in the menu ring, in this case, clicking it doesn't change the value and hence doesn't trigger the event. I tried adding a "mouse up" event to the structure, but that is only fired if the user clicks on the increment/decrement button part of the menu ring, not if they click on the text itself.

The only way around this that I've found is to add a "<Select>" item to the menu ring and make sure this is the default value. Then the user has to select something and thus change the value. Is there a better way to do this?

Thanks

Link to comment

Hi All,

I have a bit of code (LV 8.6) which populates a menu ring based on the contents of a directory. I want the user to be able to select from the menu and in doing so trigger an event (within an event structure). So, I set up a "value change" event on the menu ring and basically it works. However, sometimes there may only be one item in the menu ring, in this case, clicking it doesn't change the value and hence doesn't trigger the event. I tried adding a "mouse up" event to the structure, but that is only fired if the user clicks on the increment/decrement button part of the menu ring, not if they click on the text itself.

The only way around this that I've found is to add a "<Select>" item to the menu ring and make sure this is the default value. Then the user has to select something and thus change the value. Is there a better way to do this?

Thanks

Hi Ic3Knight,

A workaround I also like is to place a refresh button next to the control (menu ring or other) and use its value change event.

As I also find this is handy when you need to reselect that value at some point.

post-10325-034054600 1288877504_thumb.pn

Cheers

-JG

Link to comment

The only way around this that I've found is to add a "<Select>" item to the menu ring and make sure this is the default value. Then the user has to select something and thus change the value. Is there a better way to do this?

I'm not sure what you're listing, but I've allowed a NULL option in doing something similar sounding, so there was an empty string option, thus always creating at least one entry if the directory was empty, two entries if the directory had one item.

Tim

  • Like 1
Link to comment

Thanks for the replies,

I found the "mouse up" event not working quite an interesting one - how come it doesn't register the event if you mouse up on the menu itself? Only on the increment?

I like the refresh idea, and Tim_S - my "<Select>" item does pretty much what your null does too...

Thanks again!

Paul

Link to comment

Now that's odd....

The "mouse down" event will fire if I click anywhere on the menu ring. The "mouse up" event only fires if I click on the increment part of the menu ring - not the main text bit.

I thought the "mouse up" was fired when you released the mouse button over the control (similar to the way a boolean control can be set to switch on release rather than click)? So why doesn't it work on the menu ring?

Cheers

Paul

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.