Jump to content

Fire an event during Combo selection


Recommended Posts

This one's got me completely stumped: I'd like to fire an event (or the like) when you move between different options in a combo box.

post-181-1141401249.gif?width=400

That is, you click on the box to get your drop down options, and as you move the mouse over the items in the list, I'd like to programmatically change the description of the combo box:

post-181-1141401269.gif?width=400

post-181-1141401280.gif?width=400

Any ideas? It's driving me nuts! :wacko:

Download File:post-181-1141401289.vi

Link to comment

When the user scrolls in a menu it seems that it is in a different window that doesn't belong neither to the VI nor the control. However, you can still monitor the mouse movements using the Mouse Device VIs and figure which item is highlighted. That might not be font independant.

Link to comment
...you can still monitor the mouse movements using the Mouse Device VIs and figure which item is highlighted.

I'd thought of that, but it's not as trivial as it sounds. I'd need to take several things into account:

* font size, as you mentioned

* what item was selected before the user clicked on the control (this determines where the new 'window' pops up)

* screen resolution and position of control relative to the top / bottom of the screen - this also determines where the 'window' pops up.

:lightbulb: Maybe I could do it using relative move movements...

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.