LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Shrink Splitter Pane When Using "Fit Control to Pane"

Solved!
Go to solution

OK, I'm stumped, but this seems like it should be an easy issue to resolve though...

 

I've got a simple UI with two panes: a tree on the left, some other stuff on the right.  And a splitter bar in the middle. I'm using "Fit Control to Pane" on the tree control.

_carl_0-1638220586844.png

I'd like to be able to hide the tree programmatically.  Seems simple enough: just set splitter position to 1...but...this doesn't work because of the minimum width of the tree structure. If I move the splitter manually, this is the narrowest I can get the tree:

_carl_1-1638220715238.png

I was hoping that by setting the Tree's Visible property to False that I could get around this width restriction...but it still seems to exist.

 

The attached example attempts to hide (or show) the tree pane when the button is clicked. It produces this error when trying to hide the pane because of the minimum restriction:

_carl_2-1638221112083.png

 

Example in LabVIEW 2020.  Many thanks for any suggestions!

 

(The only solution I've come up with is to stop using "Fit Control to Pane", and to implement the re-size logic myself. But would prefer to avoid this if possible...)

 

 

 

0 Kudos
Message 1 of 2
(950 Views)
Solution
Accepted by topic author _carl

And....figured out how to do it.  "Scaling" is stored as part of the pane, not part of the control.  So...need to "Set Scaling" on the OwningPane of the Tree structure, then the panel can be resized:

 

_carl_0-1638226917284.png

 

0 Kudos
Message 2 of 2
(934 Views)