summaryrefslogtreecommitdiffstats
path: root/doc/ttk_scrollbar.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ttk_scrollbar.n')
-rw-r--r--doc/ttk_scrollbar.n29
1 files changed, 10 insertions, 19 deletions
diff --git a/doc/ttk_scrollbar.n b/doc/ttk_scrollbar.n
index dca1779..1724f2a 100644
--- a/doc/ttk_scrollbar.n
+++ b/doc/ttk_scrollbar.n
@@ -6,7 +6,7 @@
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SOURCE: tk/doc/scrollbar.n, r1.4
-'\" RCS: @(#) $Id: ttk_scrollbar.n,v 1.6 2007/10/26 20:13:23 dgp Exp $
+'\" RCS: @(#) $Id: ttk_scrollbar.n,v 1.7 2007/10/29 16:04:14 dkf Exp $
'\"
.so man.macros
.TH ttk_scrollbar n 8.5 Tk "Tk Themed Widget"
@@ -17,7 +17,6 @@ ttk_scrollbar \- Control the viewport of a scrollable widget
.SH SYNOPSIS
\fBttk::scrollbar\fR \fIpathName \fR?\fIoptions...\fR?
.BE
-
.SH DESCRIPTION
\fBttk::scrollbar\fR widgets are typically linked to an associated window
that displays a document of some sort, such as a file being edited or a
@@ -31,7 +30,6 @@ these are used to scroll the visible region in discrete units.
.SO
\-class \-cursor \-style \-takefocus
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
A Tcl script prefix to evaluate
@@ -48,7 +46,6 @@ or \fByview\fR (for vertical scrollbars).
One of \fBhorizontal\fR or \fBvertical\fR.
Specifies the orientation of the scrollbar.
.BE
-
.SH "WIDGET COMMAND"
.TP
\fIpathName \fBcget\fR \fIoption\fR
@@ -66,13 +63,12 @@ Test the widget state; see \fIttk_widget(n)\fR.
.TP
\fIpathName \fBset\fR \fIfirst last\fR
This command is normally invoked by the scrollbar's associated widget
-from an \fB-xscrollcommand\fR or \fB-yscrollcommand\fR callback.
+from an \fB\-xscrollcommand\fR or \fB\-yscrollcommand\fR callback.
Specifies the visible range to be displayed.
\fIfirst\fR and \fIlast\fR are real fractions between 0 and 1.
.TP
\fIpathName \fBstate\fR ?\fIstateSpec\fR?
Modify or query the widget state; see \fIttk_widget(n)\fR.
-
.SH "INTERNAL COMMANDS"
The following widget commands are used internally
by the TScrollbar widget class bindings.
@@ -103,7 +99,6 @@ Returns the name of the element under the point given
by \fIx\fR and \fIy\fR, or an empty string if the point does
not lie in any element of the scrollbar.
\fIX\fR and \fIy\fR are pixel coordinates relative to the scrollbar widget.
-
.SH "SCROLLING COMMANDS"
When the user interacts with the scrollbar, for example by dragging
the thumb, the scrollbar notifies the associated widget that it
@@ -139,29 +134,25 @@ 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 "WIDGET STATES"
The scrollbar automatically sets the \fBdisabled\fR state bit.
when the entire range is visible (range is 0.0 to 1.0),
and clears it otherwise.
It also sets the \fBactive\fR and \fBpressed\fR state flags
of individual elements, based on the position and state of the mouse pointer.
-
.SH EXAMPLE
.CS
set f [frame .f]
-ttk::scrollbar $f.hsb -orient horizontal -command [list $f.t xview]
-ttk::scrollbar $f.vsb -orient vertical -command [list $f.t yview]
-text $f.t -xscrollcommand [list $f.hsb set] -yscrollcommand [list $f.vsb set]
-grid $f.t -row 0 -column 0 -sticky nsew
-grid $f.vsb -row 0 -column 1 -sticky nsew
-grid $f.hsb -row 1 -column 0 -sticky nsew
-grid columnconfigure $f 0 -weight 1
-grid rowconfigure $f 0 -weight 1
+ttk::scrollbar $f.hsb \-orient horizontal \-command [list $f.t xview]
+ttk::scrollbar $f.vsb \-orient vertical \-command [list $f.t yview]
+text $f.t \-xscrollcommand [list $f.hsb set] \-yscrollcommand [list $f.vsb set]
+grid $f.t \-row 0 \-column 0 \-sticky nsew
+grid $f.vsb \-row 0 \-column 1 \-sticky nsew
+grid $f.hsb \-row 1 \-column 0 \-sticky nsew
+grid columnconfigure $f 0 \-weight 1
+grid rowconfigure $f 0 \-weight 1
.CE
-
.SH "SEE ALSO"
ttk_widget(n), scrollbar(n)
-
.SH KEYWORDS
scrollbar, widget