LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

scroll bar problem in cvi

i need to dynamically change the view size of scroll bar,how to do it? please give me an answer,thank you in advance!
0 Kudos
Message 1 of 3
(3,345 Views)
For a control or for a panel ?
What's wrong with

ScrollBar_SetAttribute (panel,scrollbar,ATTR_SB_WIDTH,nuValue);

There's a really good example in
MeasurementStudio\cvi\samples\userint\custctrl\scrollbar.
Not so sure about thickness of panel scrollbar, SetPanelAttribute(panelID,ATTR_SCROLL_BAR_SIZE,variable) only seems to take VAL_SMALL_SCROLL_BARS or VAL_LARGE_SCROLL_BARS
0 Kudos
Message 2 of 3
(3,345 Views)
The best way to change this (along with other scroll bar attributes) is to load the scroll.fp file that is an included instrument driver with CVI 6.0. The location of the .fp file is C:\Program Files\National Instruments\MeasurementStudio\CVI\toolslib\custctrl
There is a function ScrollBar_SetAttribute you can use from there.
Of course, you can still use ATTR_SCROLL_BAR_SIZE with SetPanelAttribute for panels, or SetCtrlAttribute for controls like textboxes.

Daniel McChane
Application Engineer
National Instruments
0 Kudos
Message 3 of 3
(3,345 Views)