LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting movement of scrollbar

Solved!
Go to solution

Hi,

 

I'm using a subpanel into my VI. It shows all the values but I want to restrict the scrollbar movement. Exactly I don't want that the scrollbar goes beyond the controls where.

 

 

Vicen

LV 7.1/2010 with WinXP

Download All
0 Kudos
Message 1 of 11
(4,523 Views)

You can remove the scroll bar and fix the size of the window upto the level which you want to show the controls.

-----

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

P Anand : Did you even look at Vicen's attached images? Removing the scrollbars would be a terrrible idea as they are necessary for the operator to scroll the subVI content.

 

Vicen : I am not aware of any options for limiting scrollbar travel unfortunately. I believe there is a scrollbar control you might be able to adapt to your requirements, but you would have to programmatically move the content of the subVI window.

 

Personally I don't think the problem you have is a big issue, it certainly wouldn't bother me as a user of your software, so if you are in any doubt about whether this is necessary I would simply forget about it Smiley Happy

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 3 of 11
(4,504 Views)

You can remove the scroll bar and fix the size of the window upto the level which you want to show the controls.
Thoric: Thats why I have made the statement to fix the size upto which he wants to show instead of limiting the scroll bar movement and I believe it make sense. Correct me if I am wrong.
-----

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

P Anand : Unless I'm mistaken, without scrollbars the operator would be unable to scroll the contained subpanel VI to show those controls that are below the visible area. Fixing the size of the sub-panel window for the demonstrated subVI front panel would result in a host VI height greater than the vertical resolution of the screen, therefore this becomes impractical. Hence scrollbars are unavoidable.

 

For other developers, venturing here for similar reasons, your solution may prove very useful, so I commend your contribution.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 5 of 11
(4,484 Views)
Solution
Accepted by topic author vicens

This may be related to the way you insert the vi in the subpanel.

 

Attached are pics of a subVI FP and of the subVI inserted in a sub panel. In one case the run method is used before the sub is inserted and we can see that the zero position of the vertical scrollbar correspond to the top of the visible sub front panel. When the method is not used the vertical scrollbar position is the same as in the subVI.

 

Hope this help.

 

Ben64

 

sub.png

Message 6 of 11
(4,459 Views)

Thanks a lot.

 

I inserted the VI before to use the run method.Smiley Surprised

 

 

 

Vicen

0 Kudos
Message 7 of 11
(4,429 Views)

This issue is only a momentary graphical glitch. If you touch the scrollbar, it reverts to the previous case whereby it allows you to scroll back up above the top of your subVI in the subpanel. I think you still need to consider another approach.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 8 of 11
(4,421 Views)

Thoric, I was not able to reproduce the behavior you described. I can't scroll back above the top of the subVI (or below). Using LV2009 and Windows XP.

 

Ben64

0 Kudos
Message 9 of 11
(4,415 Views)
I'm using 2011 SP1. I was able to replicate the look you demonstrated using similar code, but as soon as I touch the vertical scrollbar it reverts to permitting movement above the top of the sub panel content.
Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 10 of 11
(4,393 Views)