...
Name
qsettracking — enables continous mouse tracking in slider
Syntax
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
qsettracking [slider] 0 | 1 |
Description
The qsettracking command enabled or disables tracking for a slider. If tracking is enabled, the slider will invoke its callback commands for each step of the slider movement. If tracking is disabled the callback command will be called only when the user releases the mousebutton.
Tracking is enabled by default.
Arguments
slider
An instance of qhslider or qvslider object.
0 | 1
A '1' or '0', which enables or disables tracking, respectively.
Examples
Ex.1: Set tracking
Anchor | ||||
---|---|---|---|---|
|
No Format | ||||
---|---|---|---|---|
| ||||
set w [qwidget]
qsetwindowtitle Slider
set layout [qvboxlayout $w]
set slider [qhslider 1 10 puts]
qsettickposition both
qsettracking 0
qaddwidget $layout $slider
qshow $w
{noformat}
!att:_img_cmd^qsettracking.png!
The example above creates a slider with tracking disabled. The call to 'puts' will therefore be called only when the user releases the slider handle. The slider value will be appended to the 'puts' command.
{pagebreak} |
The example above creates a slider with tracking disabled. The call to 'puts' will therefore be called only when the user releases the slider handle. The slider value will be appended to the 'puts' command.