beetlebug▾
/

scrollbar fraction

Gives the fraction of the trough at a point.

PATHNAME fraction X Y

Description

Gives a number from 0 to 1: the place of the point X,Y along the trough, where 0 is the start and 1 is the end. X and Y are in pixels from the corner of the scrollbar.

Returns

A number from 0 to 1.

Examples

% scrollbar .fr
> pack .fr -fill y
> update
> .fr fraction 0 0
0.0

Errors

% scrollbar .fr2; .fr2 fraction
wrong # args: should be ".fr2 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