diff options
Diffstat (limited to 'doc/scrollbar.n')
-rw-r--r-- | doc/scrollbar.n | 67 |
1 files changed, 15 insertions, 52 deletions
diff --git a/doc/scrollbar.n b/doc/scrollbar.n index eee6a63..ee6f6dd 100644 --- a/doc/scrollbar.n +++ b/doc/scrollbar.n @@ -42,8 +42,8 @@ as described in \fBSCROLLING COMMANDS\fR below. Specifies the width of borders drawn around the internal elements of the scrollbar (the two arrows and the slider). The value may have any of the forms acceptable to \fBTk_GetPixels\fR. -If this value is less than zero, the value of the \fB\-borderwidth\fR -option is used in its place. +If this value is negative (the default is -1), the value of +the \fB\-borderwidth\fR option is used in its place. .OP \-width width Width Specifies the desired narrow dimension of the scrollbar window, not including 3-D border, if any. For vertical @@ -103,7 +103,7 @@ name is \fIpathName\fR. This command may be used to invoke various operations on the widget. It has the following general form: .CS -\fIpathName option \fR?\fIarg arg ...\fR? +\fIpathName option \fR?\fIarg ...\fR? .CE \fIOption\fR and the \fIarg\fRs determine the exact behavior of the command. The following @@ -215,15 +215,6 @@ document. 1.0 refers to the end of the document, 0.333 refers to a point one-third of the way through the document, and so on. .TP -\fIprefix \fBscroll \fInumber \fBunits\fR -. -The widget should adjust its view by \fInumber\fR units. -The units are defined in whatever way makes sense for the widget, -such as characters or lines in a text widget. -\fINumber\fR is either 1, which means one unit should scroll off -the top or left of the window, or \-1, which means that one unit -should scroll off the bottom or right of the window. -.TP \fIprefix \fBscroll \fInumber \fBpages\fR . The widget should adjust its view by \fInumber\fR pages. @@ -232,47 +223,19 @@ it is slightly less than what fits in the window, so that there is a slight overlap between the old and new views. \fINumber\fR is either 1, which means the next page should become visible, or \-1, which means that the previous page should -become visible. -.SH "OLD COMMAND SYNTAX" -.PP -In versions of Tk before 4.0, the \fBset\fR and \fBget\fR widget -commands used a different form. -This form is still supported for backward compatibility, but it -is deprecated. -In the old command syntax, the \fBset\fR widget command has the -following form: +become visible. Fractional numbers are rounded away from 0, so +scrolling 0.001 pages has the same effect as scrolling 1 page. .TP -\fIpathName \fBset \fItotalUnits windowUnits firstUnit lastUnit\fR -In this form the arguments are all integers. -\fITotalUnits\fR gives the total size of the object being displayed in the -associated widget. The meaning of one unit depends on the associated -widget; for example, in a text editor widget units might -correspond to lines of -text. \fIWindowUnits\fR indicates the total number of units that -can fit in the associated window at one time. \fIFirstUnit\fR -and \fIlastUnit\fR give the indices of the first and last units -currently visible in the associated window (zero corresponds to the -first unit of the object). -.LP -Under the old syntax the \fBget\fR widget command returns a list -of four integers, consisting of the \fItotalUnits\fR, \fIwindowUnits\fR, -\fIfirstUnit\fR, and \fIlastUnit\fR values from the last \fBset\fR -widget command. -.PP -The commands generated by scrollbars also have a different form -when the old syntax is being used: -.TP -\fIprefix\fR \fIunit\fR -\fIUnit\fR is an integer that indicates what should appear at -the top or left of the associated widget's window. -It has the same meaning as the \fIfirstUnit\fR and \fIlastUnit\fR -arguments to the \fBset\fR widget command. -.LP -The most recent \fBset\fR widget command determines whether or not -to use the old syntax. -If it is given two real arguments then the new syntax will be -used in the future, and if it is given four integer arguments then -the old syntax will be used. +\fIprefix \fBscroll \fInumber \fBunits\fR +. +The widget should adjust its view by \fInumber\fR units. +The units are defined in whatever way makes sense for the widget, +such as characters or lines in a text widget. +\fINumber\fR is either 1, which means one unit should scroll off +the top or left of the window, or \-1, which means that one unit +should scroll off the bottom or right of the window. Fractional +numbers are rounded away from 0, so scrolling 0.001 units has +the same effect as scrolling 1 unit. .SH BINDINGS .PP Tk automatically creates class bindings for scrollbars that give them |