LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[LV2013] Events ordering (mouse down vs. value changed) ?

Solved!
Go to solution

That's what originated my "nasty nasty" rant, because that's not

the only things you have to do by hand under Labview to try to

get things done the right way.

 

Say, for instance, limit scroling of listview to their content only,

even if you continue clicking the down arrow while having

reached the bottom.

 

Or avoid editing a multicolumnlist's cell when you click on it.

 

All these little tricks you have to implement by yourself.

 

David Koch

0 Kudos
Message 21 of 22
(892 Views)

Hello Intaris, I've followed your advices and I

used the following mouse events on my Tree

control :

 

Mouse Down, Mouse Up : register/free the Tree's refnum

Mouse Leave : free the Tree's refnum

 

Here is "Mouse Down" on the Tree control.

If the mouse pointer is within the 2D limits,

I do register the current refnum of the tree

and leave it to Labview dealing with the

generated events like "Value changed",

otherwise I reset the refnum :

 

Clipboard_20150817_113110.png

 

Here is "Mouse Up" that filters the event if the

mouse pointer is within the 2D limits as well,

but also if the mouse button was pressed

withing the Tree control by verifying the

refnum as well :

 

Clipboard_20150817_113107.png

 

Here' is the case when the mouse pointer

leaves the actual Tree control, I reset the

refnum so that even though I return the

pointer in the Tree control, the previous

"Mouse Down" event is canceled. It also

ensure that when you click another control

outside the Tree, the refnum is reseted

first so that even if you drag your mouse

pointer in, the "Mouse Up" event gets

filtered out :

 

Clipboard_20150817_113121.png

 

This quick and dirty hack seems to work rather

fine, thanks for the tip 🙂

 

David Koch

0 Kudos
Message 22 of 22
(824 Views)