beetlebug▾
/

ttk::scrollbar fraction

Gives the fraction of the trough at a pixel point.

PATHNAME fraction X Y

Description

Gives a fraction from 0 to 1 for the point X and Y in the widget: 0 at the start of the trough and 1 at its end. The scrollbar must be on the screen for a useful result.

Returns

A fraction.

Examples

% ttk::scrollbar .tsrfr
> place .tsrfr -x 0 -y 0 -width 16 -height 200
> update
> .tsrfr fraction 5 100
0.5

Errors

% ttk::scrollbar .tsrfr2; .tsrfr2 fraction 1
wrong # args: should be ".tsrfr2 fraction x y"
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also