.BI "\fBTQScrollBar\fR ( int minValue, int maxValue, int lineStep, int pageStep, int value, Orientation orientation, TQWidget * parent, const char * name = 0 )"
A scroll bar allows the user to control a value within a program-definable range and gives users a visible indication of the current value of a range control.
.PP
Scroll bars include four separate controls:
.IP
.TP
The \fIline-up\fR and \fIline-down\fR controls are little buttons which the user can use to move one "line" up or down. The meaning of line is configurable. In editors and list boxes it means one line of text; in an image viewer it might mean 20 pixels.
.IP
.TP
The \fIslider\fR is the handle that indicates the current value of the scroll bar, which the user can drag to change the value. This part of the scroll bar is sometimes called the "thumb".
.IP
.TP
The \fIpage-up/page-down\fR control is the area on which the slider slides (the scroll bar's background). Clicking here moves the scroll bar towards the click. The meaning of "page" is also configurable: in editors and list boxes it means as many lines as there is space for in the widget.
TQScrollBar has very few of its own functions; it mostly relies on TQRangeControl. The most useful functions are setValue() to set the scroll bar directly to some value; addPage(), addLine(), subtractPage(), and subtractLine() to simulate the effects of clicking (useful for accelerator keys); setSteps() to define the values of pageStep() and lineStep(); and setRange() to set the minValue() and maxValue() of the scroll bar. TQScrollBar has a convenience constructor with which you can set most of these properties.
l - l. Signal Emitted when valueChanged() the scroll bar's value has changed. The tracking() determines whether this signal is emitted during user interaction. sliderPressed() the user starts to drag the slider. sliderMoved() the user drags the slider. sliderReleased() the user releases the slider. nextLine() the scroll bar has moved one line down or right. Line is defined in TQRangeControl. prevLine() the scroll bar has moved one line up or left. nextPage() the scroll bar has moved one page down or right. prevPage()
TQScrollBar only provides integer ranges. Note that although TQScrollBar handles very large numbers, scroll bars on current screens cannot usefully control ranges above about 100,000 pixels. Beyond that, it becomes difficult for the user to control the scroll bar using either the keyboard or the mouse.
A scroll bar can be controlled by the keyboard, but it has a default focusPolicy() of NoFocus. Use setFocusPolicy() to enable keyboard focus. See keyPressEvent() for a list of key bindings.
.SH "TQScrollBar::TQScrollBar ( int minValue, int maxValue, int lineStep, int pageStep, int value, Orientation orientation, TQWidget * parent, const char * name = 0 )"
Constructs a scroll bar whose value can never be smaller than \fIminValue\fR or greater than \fImaxValue\fR, whose line step size is \fIlineStep\fR and page step size is \fIpageStep\fR and whose value is initially \fIvalue\fR (which is guaranteed to be in range using bound()).
.PP
If \fIorientation\fR is Vertical the scroll bar is vertical and if it is Horizontal the scroll bar is horizontal.
Returns TRUE if the user has clicked the mouse on the slider and is currently dragging it; otherwise returns FALSE. See the "draggingSlider" property for details.
Set this property's value with setPageStep() and get this property's value with pageStep().
.SH "bool tracking"
This property holds whether scroll bar tracking is enabled.
.PP
If tracking is enabled (the default), the scroll bar emits the valueChanged() signal while the slider is being dragged. If tracking is disabled, the scroll bar emits the valueChanged() signal only when the user releases the mouse button after moving the slider.
.PP
Set this property's value with setTracking() and get this property's value with tracking().
.SH "int value"
This property holds the scroll bar's value.
.PP
Set this property's value with setValue() and get this property's value with value().