LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Splitter sizing odd behavior

My VI consists of multiple charts and control buttons for them. I want to be able to resize the charts when user resize the window but no the buttons. So I am using multiple splitters: First splitting horizontally, and the splitting each rows into columns.

 

The first rows behaves exactly as I want. For some reason the last row doesn't. I set the Splitter Sizing basically the same way for them. Any ideas?

 

Original sizing:

Capture.JPG

After dragging the window larger:

Capture2.JPG

 

As you can see the lower left chart won't resize. I noticed if both vertical splitters on this rown are size proportionally, then the chart would resize as expected, but then the row of buttons would not line up with the buttons above anymore.

 

Side note, I noticed the 2 charts on the same row are not resized the same way. The chart to the right is noticably wider than the one on the left after resizing. Any way to avoid that?

0 Kudos
Message 1 of 20
(4,459 Views)

Why are you using the Splitters? Why not just scale the objects with Pane which will automatically resize according to the window size. Set the Size of the default window screen, select the Object (Chart in your case) and select "Scale Object with Pane". Now if you resize the window the charts will automatically size itself to the proportion.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 20
(4,420 Views)

Pardon me if I got it wrong. This is all new.

 

Don't I need to use splitters to create panes? I thought that's what I am doing, creating a pane for each charts so I can use check the "Scale Object with Pane" box. Prior to this when everything are in a single pane it seems like only 1 single chart can have the "Scale Object with Pane" selected.

0 Kudos
Message 3 of 20
(4,390 Views)

There's an option to scale all objects with pane which will make everything on the front panel grow/shrink as you resize the window. I think it generally has less-than-ideal results though.

 

I would have thought that your bottom right splitter should be 'stick right' so it sticks with a fixed width to the right hand side of the pane - that will allow the bottom left splitter to move when you resize the pane.

 

Note though that I use splitters quite a lot in my applications and can sometimes find very strange behaviours when resizing objects - sometimes things like graph labels/scale labels can move around and not return to their original position - particularly if you allow things to shrink. Something to bear in mind.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 20
(4,381 Views)

I changed all the right most splitters to stick right and it look like this after making window wider:

Capture.JPG

The last chart stretches too much instead. I'd love to have all charts to remain the exact same size during resizing. The 2 charts to the right still ended up wider than the left ones.

0 Kudos
Message 5 of 20
(4,374 Views)

P@Anand wrote:

Why are you using the Splitters? Why not just scale the objects with Pane


I would never recommend using this feature.  Unless you know something I don't, this feature has never done what I want consistently.  Splitters fix all my resizing issues and help break up the UI into manageable chunks.  If you can post your VI, or rather the VI with just the front panel. 

Message 6 of 20
(4,357 Views)

@Hooovahh wrote:

P@Anand wrote:

Why are you using the Splitters? Why not just scale the objects with Pane



I would never recommend using this feature.  Unless you know something I don't, this feature has never done what I want consistently.  Splitters fix all my resizing issues and help break up the UI into manageable chunks.  If you can post your VI, or rather the VI with just the front panel. 


 

I spent my first few years of LV programming denying people the ability to resize panes for this exact reason. That function almost never does what I want it to do.  It wasn't until I started using splitters heavily that I was able to make a front panel that would actually resize correctly.

Message 7 of 20
(4,351 Views)

I think I did insert my VI front panel in my original post.

 

I think I finally understand what you are talking about. So I tried putting all my charts in a group and they choose "Resize with pane". So now all charts would resize uniformly. The only downside is the rest of the controls start spreading out, so lots of extra spacing everywhere.

0 Kudos
Message 8 of 20
(4,339 Views)

@jbphili wrote:

I think I did insert my VI front panel in my original post.


You didn't.  You took a picture of your front panel, it would be easier to help you if you shared the code (VI).

0 Kudos
Message 9 of 20
(4,333 Views)

OK. Here it is. This is still the version with splitters.

0 Kudos
Message 10 of 20
(4,321 Views)