LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting scrolling area of Scroll bars in LV8

Hi Labview Friends
 
I have a question concerning scroll bars.  I am using Labview 8.0 and enjoy the advantages of using a splitted front panel. So I have built a toolbar which remains always at the top of the window. However, below this toolbar is the MAIN FRAME where the user can scroll through.
My question: How can I make it possible to limit the scrolling area of the main frame? For example I would like to have a top position of the main frame, where it is not possible to go more top (initial situation). The same at the bottom of the main frame. To be more precise: The user can now scroll through parts of the mainframe where are no controls or indicators anymore. Does anyone have an idea how to prevent this?
 
Greetings and thank you in advance for any help
 
Woodi
0 Kudos
Message 1 of 3
(2,989 Views)

If you are displaying the panel scrollbars at run-time, then I don't know of any way to limit how far the panel can be scrolled.  My best suggestion for you is to hide the scrollbars on the window itself, and instead stick your own scrollbars on there.  LabVIEW 8.0 introduced the Scrollbar Control (on the Numeric subpalette)...you can put these on your panel, and you can simply set the data range on the scrollbars to indicate how far you want the user to be able to scroll.  Also, you can have the scrollbars coerce to the data range so it is impossible to scroll them beyond that range.  And depending on the position of the scrollbars, you can programmatically change the panel position.  I realize this would require extra coding, but it's the only think I can think of if you want a scrollable front panel, but you want limits on the scrolling.

Have you considered some other UI construct besides scrolling to present all your configuration options to your user?  Perhaps a Tab Control would be a better choice?

Good luck,
-D

0 Kudos
Message 2 of 3
(2,987 Views)
Hello Darren

Thank you a lot for jour help. I haven't thought of using the new scrollbar controls. That seems to be a good idea, i will try that tomorrow. I don't care about the extra code because my VI is quite complicated anyway.
I am already using plenty of Tab controls, but sometimes I just need more space, so there is no way around using scroll bars.

Have a nice day and thank you for your post.

Woodi
0 Kudos
Message 3 of 3
(2,979 Views)