05-09-2012 05:44 AM
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
Solved! Go to Solution.
05-09-2012 05:53 AM
You can remove the scroll bar and fix the size of the window upto the level which you want to show the controls.
05-09-2012 06:38 AM
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
05-09-2012 06:43 AM
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.
05-09-2012 07:15 AM
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.
05-09-2012 09:22 AM
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
05-09-2012 10:34 AM
Thanks a lot.
I inserted the VI before to use the run method.
Vicen
05-09-2012 10:42 AM
05-09-2012 11:01 AM
05-09-2012 12:58 PM