03-26-2021
05:07 AM
- last edited on
03-29-2021
03:14 PM
by
markwni
Hello everyone hope you are doing great.
I'am trying to insert a VI with one splitter into a sub-panel. The sub-panel has one size at the begining, then when i click on the main pane it should resize.
The problem is that the inserted VI move the spliter to the very top of the subpanel, then when the subpanel resizes the splitter is still at the top :
That's the VI that i am trying to insert.
That's the subpanel where i inserted the previous VI so as you can see when the subpanel is smaller than the VI with the splitters those goes at the top, then when i resize i get this :
The splitter still at the top and i need it to be where it was in the middle. Can someone please tell me if there is a solution? I need only to resize the subpanel and the inserted VI should'nt be resized, and the splitter should'nt move.
You can find my POC in the attached files.
Thank you.
Luis
03-26-2021 06:13 AM
In SplitterMain.vi, set Splitter Sizing to Proportionally.
In my experience, it's better to this kind of 'math' manually though. By resizing positions get rounded to integers, and that accumulated rounding can lead to wrong proportions over a number of resizes.
I'd handle pane size and\or panel size events in the VI itself, and make it set it's splitter position.