Jump to content

LabVIEW Ring Controls: How to Expand/Activate on Mouse Enter and Collapse/Deactivate on Mouse Leave Events?


Recommended Posts

I'm looking for a way to automatically expand and collapse ring controls.

Example: 2023-03-30_19h59_59.gif.89b7432398978e7757efd600aa98a9b9.gif

I have already seen a method where mouse click is simulated using user32.dll when mouse entered. I just want to know whether there are any better methods available. Also I do have access to LabVIEW 2022 Q3... incase if any new property/method added, kindly let me know! 

Thanks in advance!

Edited by Achuthaperumal RK
text spacing correction
Link to comment

Someone else may know a better way to do it, but I was curious, so I did a quick google search and found this on the NI forums.

I downloaded the "Menu_demo2_vi" and made a couple of modifications to the event structure - adding some "Mouse Enter" and "Mouse Leave" events to the event case that toggles visibility. 

I don't consider this to be a very streamlined solution and would opt for something better if available.  But, it's at least proof that the behavior can be emulated in LabVIEW somehow. 

(Attached file is in LabVIEW 2020)

Menu_demo3..vi

  • Like 1
Link to comment

I've been playing with this a little more and I believe a simpler way may be to have a string indicator that can show/hide a list box on "Mouse Enter/Leave".  Here's a little example I whipped up quickly.  Again, probably not a preferred or the best way, but doable.

Note - I found that ensuring that the hidden/visible items list needs to have key focus if it's going to need to "appear" over another control or indicator, at least in my limited testing of it.

Hover Menu Example.vi

Edited by Bryan
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.