LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can the scrollbars on an executable be made to go away when the window is resized to a certain size

Hi, I have an executable that contains aTab control.  The size of the tab control is small and there are  no other controls on the front panel except those on the tab control.  Users have requested the ability to have the scrollbars disappear when the window is resized to show the complete tab control.  Using the VI properties I can display the scrollbars or not but can't find a way to make them optional depending on window size.  Am I overlooking something or is this not a possibility?  Regards, Mike
0 Kudos
Message 1 of 7
(2,841 Views)
Create a property node and link it to the pane(right-click..link to..pane). Here you can set the visibility of the horizontal and vertical scrollbars programmatically.
 
Now you just need some code to ensure that the panel size is sufficient and that your tab control fits the window, i.e. even if the size of the panel is bigger, you might get clipping if the tab is not aligned with the upper right corner of the window. It definitely seems doable. 🙂
 
0 Kudos
Message 2 of 7
(2,834 Views)

Just for you.

LV 8.2

Message Edited by Marc A on 01-16-2007 01:33 PM

0 Kudos
Message 3 of 7
(2,829 Views)

Altenbach, thanks for the pointer.  I play around with it, see what comes out the other end.

Marc, sadly, when I try to load the vi you attached I get a message it was written in LV 8.2 and won't load into 8.0

Regards, Mike

0 Kudos
Message 4 of 7
(2,815 Views)
Ask and you shall receive.
0 Kudos
Message 5 of 7
(2,805 Views)
Marc's excellent solution should get you started. Still, you need to deal with cases where the user scrolls around (they always do! ;)), then resizes the window so the scrollbars disappear (see attached image).
 
The insert shows a simplistic way to deal with this: Whenever the scrollbars changes, reset the upper left corner of the pane. Modify as needed.
 
 

Message Edited by altenbach on 01-16-2007 01:26 PM

0 Kudos
Message 6 of 7
(2,798 Views)

I already ran across that problem playing with Marcs excellent example and was considering how to handle it.  Your tip will save me some time.  Thanks again.

Marc, thank you for your example.  As a casual lv programmer, I have never needed to use property nodes.  There is a lot more to LV than a casual use indicates.

Thanks again to you both.  Mike

0 Kudos
Message 7 of 7
(2,784 Views)