Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Name

qsettracking — enables continous mouse tracking in slider

Syntax

Panel
bgColor#FFFFAA
borderWidth1
borderStylesolid

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
Set tracking
Set tracking

No Format
bgColor#eeeeee
borderWidth1
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}

Image Added

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.