From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Splitter moved event

Solved!
Go to solution

I need to monitor movement of UI Splitter. It seems to be a simple task but...

 

Splitter has only conventional mouse events. But  "Mouse Up" is launched when clicking the splitter but is not launched when the splitter moved. Other mouse events behave similarly.

 

Panel Size event works well but launched two times when the splitter is moved. Why? Same new bounds are reported both times. I can filter out second event but is it right way?

 

Is there a "correct" way to watch movement of the splitter?

 

Thank you

 

I attach a simple test VI (LabVIEW 2015)

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 1 of 3
(3,195 Views)
Solution
Accepted by topic author _Y_

The fact that mouse up does not work as you think is expected. The mouse is NOT above the splitter anymore when letting go the mouse button in case you want to move the splitter. Hence, it will not generate the event.

 

The two-times resize event is also expected behavior. Well, at least it is documented in the Panel Resize Event help:

Because LabVIEW may generate multiple Pane Size events while you resize the pane, LabVIEW generates a final event at the end of the resizing operation in which OldBnds and NewBnds return the same value. You can use the values to identify in the code when the sizing operation finishes.

It is easier to understand if you resize the whole panel (which is not possible due your blocking dialog). During the resize process, the event is fired several times. Once finished, the last event (after 'drag of panel size' has finished) makes sure that you know the final size of the panel/pane.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 3
(3,176 Views)

Thank you

 

Conclusions:

1. There is not way to avoid filtering

2. Events with different OldBnds and NewBnds should be filtered out.

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
Message 3 of 3
(3,166 Views)