ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems handling mouse clicks in labview

Hi,

I have created a table on my front panel for users to enter data into. When they click on certain lines, myu program will open up another panel to select items from a list. I am having problems making it regonise what line has been clicked. If i use mouse down as the trigger, it is always one click behind, and if i use mouse up, it triggers the event multiple times. Any ideas?
0 Kudos
Message 1 of 7
(3,556 Views)
What version of LabVIEW are you using, and are you using the Events, or WIN API?
0 Kudos
Message 2 of 7
(3,556 Views)
I am using LabVIEW 6.1 and i am using the event handler. It is my favourite new toy, but it is misbehaving!
0 Kudos
Message 5 of 7
(3,556 Views)
Sometimes it is a little odd trying to figure out what is going on with the event structure. Chances are your event is in a while loop. I recommend using the value changed event with the controls set to latch when pressed. Be sure the controls are in the while loop on the block diagram so that they will pop back up.

You should also run your VI in highlight execution mode so that you can track exactly what is happening when.

Jeremy Braden
National Instruments
0 Kudos
Message 3 of 7
(3,556 Views)
I a using both the value changed event, and the mouse down event on my table. I need to react to both mouse clicks ( to check what that field represents) and the value changed event to register any changes. the handler is in a loop. I cant latch the control as it is a table.

The problem i am having is that if i use the mouse down event to capture clicks, the vi doesn't rregister this untill i click again.

If i use the mouse up event, the vi responds three times.
0 Kudos
Message 4 of 7
(3,556 Views)
Hi,

Just a hunch, I haven't used the events jet (still using 6.0.2)...

Is the other panel allways open? E.g. will it change when you choose another
cell, or will it open the window every time you click a cell?

If you have to click twice, the first time might be used to make the window
"active". Second time is used to click the control.

Regards,

Wiebe.


"Matthew Simpson" wrote in message
news:506500000008000000EF4E0000-1023576873000@exchange.ni.com...
> Hi,
>
> I have created a table on my front panel for users to enter data into.
> When they click on certain lines, myu program will open up another
> panel to select items from a list. I am having problems making it
> regonise what line has been clicked. If i use mouse down as the
> trigge
r, it is always one click behind, and if i use mouse up, it
> triggers the event multiple times. Any ideas?
0 Kudos
Message 6 of 7
(3,556 Views)
I am using LV 6.0.2 and so not the event trigger. But i have come across the same problem (i think) when using tables. I wanted to hightlight a cell/line using the mouse, but only the past 'active cell' would hightlight as seems to have happened with you. The same vi in LV 5.0 worked perfectly, so in the end i decided it must be a LV 6.0.2 bug. As i wanted to use the updated LV version, I used a multicolumn listbox instead to select/highlight which was better for me anyway as you can select using a double-click.

Hope this helps you.
0 Kudos
Message 7 of 7
(3,556 Views)