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: 

What sets the min and max scrollable position of a pane?

I feel like this should be obvious but I can't seem to figure it out. I somehow made a panel with just two controls visible (a subpanel and a cluster of some buttons). The origin of my VI is at 0,0 and 100% of everything is totally visible.

 

Somehow, in this one panel, the scrollbar in edit time lets me scroll above the topmost control by 80 pixels and to the left by 130 pixels when I drag the scrollbar. At runtime, it's less- about 5 pixels.

 

I tried to reproduce this on something I could distribute but couldn't. It seems like if I scroll above the origin in a VI, it "remembers" somehow and will always let me scroll back up a ways, even if there's no controls/decorations/etc up there.

 

So... how do I set the range of the main scrollbars?

0 Kudos
Message 1 of 5
(1,825 Views)

Sorry I can't help; built-in scroll bars on controls and indicators are terrible, it appears panes suffer than same misfortune. For some controls, you can just keep scrolling for ever even when there is nothing there.

 

Ever wonder why LabVIEW includes separate scrollbars as controls?

 

Rant over.

 

Maybe @paul_cardinale knows a secret method to access those properties.

 

mcduff

0 Kudos
Message 2 of 5
(1,787 Views)

I'm a derp, apologies. Wrong post.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 3 of 5
(1,760 Views)

I'm not sure, but a speculation I have is that it may be related to differences in what of the window is visible at runtime versus at edit time. So, something I've noticed with subpanels is that the VI inserted behaves very slightly differently (similar to what you just described) when the subpanel has its border visible vs when it is not visible. Does the behavior you described follow the vi if you place it in a subpanel? when it is run within the development environment, or when built as an exe? Where it shows up could help find the cause... but also it could just a quirk of scrollbars in LabVIEW...

Philip Bear
Certified LabVIEW Developer
0 Kudos
Message 4 of 5
(1,754 Views)

I haven't run this VI itself in a subpanel, it's the VI that *contains* the subpanel that's the problem. I also haven't built it as an exe but I could certainly try that and see if there's a difference.

0 Kudos
Message 5 of 5
(1,725 Views)