08-12-2015 01:47 AM
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
08-17-2015 04:43 AM - edited 08-17-2015 04:45 AM
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 :
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 :
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 :
This quick and dirty hack seems to work rather
fine, thanks for the tip 🙂
David Koch