From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

disappearing scrollbar in subpanel

I have a subvi whose front panel is a listbox expanded to fit the entire screen

 

In my main vi, I take the subvi reference and insert it into a subpanel.  All is well in the world.

 

However, if at any point the subpanel width becomse too small, it will EAT the scrollbar and then the scrollbar will never come back.  Here are a progression of pictures that illustrate this:

ni

ni2.png

ni3.png

ni4.png

ni5.png

 

i have tried everyhing to fix this after the scrollbar has been borken:

1) programatically turn scrollbar off and then back on

2) remove the subvi from the panel and then re-insert

3) other stuff

 

I know that setting the panel width to a minimum width greater than the width of the scrollbar would fix this, but I do not accept that option because i would like to be able to collapse these subpanels and uncollapse on the gui

 

many thanks for any help

0 Kudos
Message 1 of 2
(2,042 Views)

I'm guessing the problem is that the resizing code uses the current sizes, and the current sizes are always integers. This allows the operation to accumalate rounding errors and produce things like this. Specifically, in this case, when you resize to minimum, the SP size is probably rounded so that it's bigger than the pane. Then, when you resize back, it remains bigger.

 

One thing which I believe should work is using the pane size event to detect the resize, compare the old and new bounds to detect the last resize (they should be equal), and then call the Fit to Pane method on the control.


___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,019 Views)