diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-28 12:25:53 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-28 12:25:53 (GMT) |
commit | b5e7e8747736a9f4f6e9c3ad6e1763b6a5900c9c (patch) | |
tree | d43ab195bbb59360312c2df24cc52e874efc6409 /doc/scrollbar.n | |
parent | bffdac3cbb0bfe12357f55cdc4fb24195743fbcf (diff) | |
download | tk-b5e7e8747736a9f4f6e9c3ad6e1763b6a5900c9c.zip tk-b5e7e8747736a9f4f6e9c3ad6e1763b6a5900c9c.tar.gz tk-b5e7e8747736a9f4f6e9c3ad6e1763b6a5900c9c.tar.bz2 |
More minor doc fixes
Diffstat (limited to 'doc/scrollbar.n')
-rw-r--r-- | doc/scrollbar.n | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/doc/scrollbar.n b/doc/scrollbar.n index b6c24ea..8cc35fc 100644 --- a/doc/scrollbar.n +++ b/doc/scrollbar.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: scrollbar.n,v 1.5 2004/09/19 16:05:37 dkf Exp $ +'\" RCS: @(#) $Id: scrollbar.n,v 1.6 2004/10/28 12:25:53 dkf Exp $ '\" .so man.macros .TH scrollbar n 4.1 Tk "Tk Built-In Commands" @@ -80,7 +80,6 @@ the top third of its document. Scrollbars can be used to adjust the view in the associated window by clicking or dragging with the mouse. See the \fBBINDINGS\fR section below for details. - .SH "ELEMENTS" .PP A scrollbar displays five elements, which are referred to in the @@ -100,7 +99,6 @@ The region between the slider and \fBarrow2\fR. .TP 10 \fBarrow2\fR The bottom or right arrow in the scrollbar. - .SH "WIDGET COMMAND" .PP The \fBscrollbar\fR command creates a new Tcl command whose @@ -190,7 +188,6 @@ For example, if \fIfirst\fR is 0.2 and \fIlast\fR is 0.4, it means that the first part of the document visible in the window is 20% of the way through the document, and the last visible part is 40% of the way through. - .SH "SCROLLING COMMANDS" .PP When the user interacts with the scrollbar, for example by dragging @@ -227,7 +224,6 @@ 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 @@ -268,13 +264,11 @@ 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. - .SH BINDINGS Tk automatically creates class bindings for scrollbars that give them the following default behavior. If the behavior is different for vertical and horizontal scrollbars, the horizontal behavior is described in parentheses. - .IP [1] Pressing button 1 over \fBarrow1\fR causes the view in the associated widget to shift up (left) by one unit so that the @@ -336,6 +330,16 @@ as mouse clicks over \fBtrough1\fR and \fBtrough2\fR, respectively. The Home key adjusts the view to the top (left edge) of the document. .IP [14] The End key adjusts the view to the bottom (right edge) of the document. +.SH EXAMPLE +Create a window with a scrollable \fBtext\fR widget: +.CS +toplevel .tl +text .tl.t -yscrollcommand {.tl.s set} +\fBscrollbar\fR .tl.s -command {.tl.t yview} +grid .tl.t .tl.s -sticky nsew +grid columnconfigure .tl 0 -weight 1 +grid rowconfigure .tl 0 -weight 1 +.CE .SH KEYWORDS scrollbar, widget |