LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Vertical scroll bar for one-line Text Box

Hello,

 

I have a multi-line text box, with vertical scrolling enabled, that is one line high.  When the text box is compressed to one line, the vertical scroll bar disappears.  While scrolling is possible using the up/down keyboard keys, I still need a vertical scroll bar. 

I tried using a Numeric Control, (and having the Numeric Control display the line number would be a plus).  Trouble is, the numbers advance in the wrong direction.  I.e. to advance from line 1 to line 2 one would normally click the down arrow on the "scroll bar" but, of course, with a numeric control the number decrements.  The numeric control will not accept an increment value of -1 (with data type as signed int).  I can "fake it" by observing the direction of change of the number in the numeric control, reverse the change, and then refresh the control with the new number, but a simpler way would be preferred.  Thanks for any suggestions.

 

Joe
0 Kudos
Message 1 of 2
(3,193 Views)
Hi Joe, you could use the scroll bar control instrument driver ( <cvidir>\toolslib\custctrl\scroll.fp ) : the only caveat is that I don't know how it will appear when reduced in size as a one-line textbox.
A sample project that uses it is <cvidir>\samples\userint\custctrl\scrollbar\scrollsample.prj


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,178 Views)