Jump to content

mouse middle button change button state?


mojalan

Recommended Posts

Hi

a simple but dangerous problem in my project

a button with default state FALSE and mechanical action : Switch until released

this button turn on/off an LED indicator. very simple example;

 

if USER press mouse middle butten and hold it; then press left button of mouse

button state change from FALSE to TRUE and it is very dangerous for me?

Edited by mojalan
Link to comment

I think you need to learn to ask questions a little clearer, but I think I see you problem and I would consider it a bug.

 

In LabVIEW 2011 SP1 I made a button, then set it to Switch Until Released.  In this state the user should will click the button, and when they release it it will return to the state it was in.  So a user should only ever have a True state when the button is down, and when the mouse button is up it should always be False.

 

What mojalan was trying to say is if you press and hold the center mouse button (button 3) the button will change to True as if the left mouse button had been used.  Then while holding the center mouse button, hold the left mouse button.  Now the button will change to False.  Then release the center mouse button.  Now the button will change to True.  Now release the left mouse button, but this time the button remains True.

 

There are many work arounds.  The first that comes to mind is use an event structure and select the "Mouse Down?" event, and if the mouse button is button 3 then discard the request for a mouse down (wire a True to the discard terminal).  This will then prevent the center button from doing anything.

  • Like 1
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.