LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why my splitters behaviors are different between 2 same coded VIs ?

Solved!
Go to solution

Hello everyone !
I'm working with making my front panel more user friendly and ergonomic using subpanel in panes, delimited with splitters.
I'm using a button to split my front panel in 2 or 3 parts.
I have 2 codes (here in LV 2019 but in fact I use LV 2025).
1) The "IsWorking.vi" vi is working as expected. When I move the central splitter my 2nd splitter is following and I can move the splitter with no limit from the left to the right of the window.
2) The "IsNotWorking.vi" vi is, as you can imagine, not working ^^' I can move the left splitter but the right one is not moving. And I cannot move freely.

 

The 2 VIs are, as far as I could check, similar. The properties and the code inside are the same. I tried to change many properties but it did no solve my issue.
Does anyone have an idea ?

Thanks and see you soon I hope 😉

0 Kudos
Message 1 of 3
(171 Views)
Solution
Accepted by topic author TenJigoku77

Hi Ten,

 

This is because in "IsWorking.vi", you created the left splitter first, then the right splitter.

In "IsNotWorking.vi", you created the right splitter first, then the left splitter.

 

As it is implemented in LabVIEW, each time you add a splitter, it creates a hierarchy with 2 child elements.

The child elements can either be a Pane or another Splitter, which will also have 2 child elements, and so on...

 

So in "IsWorking.vi", the right splitter is a child of the left splitter, which allows it to automatically reposition when the user moves the left splitter.

In "IsNotWorking.vi", the right splitter is the parent of the left splitter, so dragging the left splitter won't have any effect on the right splitter.

 

You could have more control on splitter positioning by registering the "Pane Size" events of your panes, but dynamic front panel positioning and sizing is notoriously hard with LabVIEW.

 

Regards,

Raphaël.

Message 2 of 3
(131 Views)

Thank you very much for the answer. 
It works like a charm !
Indeed managing splitters dynamically is quite painful ^^'

0 Kudos
Message 3 of 3
(113 Views)