415 lines
21 KiB
HTML
415 lines
21 KiB
HTML
|
<HTML><HEAD><TITLE>Tk Built-In Commands - scrollbar manual page</TITLE></HEAD><BODY>
|
||
|
<DL>
|
||
|
<DD><A HREF="scrollbar.htm#M2" NAME="L993">NAME</A>
|
||
|
<DL><DD>scrollbar - Create and manipulate scrollbar widgets</DL>
|
||
|
<DD><A HREF="scrollbar.htm#M3" NAME="L994">SYNOPSIS</A>
|
||
|
<DL>
|
||
|
<DD><B>scrollbar</B> <I>pathName </I>?<I>options</I>?
|
||
|
</DL>
|
||
|
<DD><A HREF="scrollbar.htm#M4" NAME="L995">STANDARD OPTIONS</A>
|
||
|
<DL>
|
||
|
<DD><A HREF="options.htm#M-activebackground">-activebackground, activeBackground, Foreground</A>
|
||
|
<DD><A HREF="options.htm#M-background">-background or -bg, background, Background</A>
|
||
|
<DD><A HREF="options.htm#M-borderwidth">-borderwidth or -bd, borderWidth, BorderWidth</A>
|
||
|
<DD><A HREF="options.htm#M-cursor">-cursor, cursor, Cursor</A>
|
||
|
<DD><A HREF="options.htm#M-highlightbackground">-highlightbackground, highlightBackground, HighlightBackground</A>
|
||
|
<DD><A HREF="options.htm#M-highlightcolor">-highlightcolor, highlightColor, HighlightColor</A>
|
||
|
<DD><A HREF="options.htm#M-highlightthickness">-highlightthickness, highlightThickness, HighlightThickness</A>
|
||
|
<DD><A HREF="options.htm#M-jump">-jump, jump, Jump</A>
|
||
|
<DD><A HREF="options.htm#M-orient">-orient, orient, Orient</A>
|
||
|
<DD><A HREF="options.htm#M-relief">-relief, relief, Relief</A>
|
||
|
<DD><A HREF="options.htm#M-repeatdelay">-repeatdelay, repeatDelay, RepeatDelay</A>
|
||
|
<DD><A HREF="options.htm#M-repeatinterval">-repeatinterval, repeatInterval, RepeatInterval</A>
|
||
|
<DD><A HREF="options.htm#M-takefocus">-takefocus, takeFocus, TakeFocus</A>
|
||
|
<DD><A HREF="options.htm#M-troughcolor">-troughcolor, troughColor, Background</A>
|
||
|
</DL>
|
||
|
<DD><A HREF="scrollbar.htm#M5" NAME="L996">WIDGET-SPECIFIC OPTIONS</A>
|
||
|
<DL>
|
||
|
<DD><A HREF="scrollbar.htm#M6" NAME="L997">-activerelief, activeRelief, ActiveRelief</A>
|
||
|
<DD><A HREF="scrollbar.htm#M7" NAME="L998">-command, command, Command</A>
|
||
|
<DD><A HREF="scrollbar.htm#M8" NAME="L999">-elementborderwidth, elementBorderWidth, BorderWidth</A>
|
||
|
<DD><A HREF="scrollbar.htm#M9" NAME="L1000">-width, width, Width</A>
|
||
|
</DL>
|
||
|
<DD><A HREF="scrollbar.htm#M10" NAME="L1001">DESCRIPTION</A>
|
||
|
<DD><A HREF="scrollbar.htm#M11" NAME="L1002">ELEMENTS</A>
|
||
|
<DL>
|
||
|
<DD><A HREF="scrollbar.htm#M12" NAME="L1003"><B>arrow1</B></A>
|
||
|
<DD><A HREF="scrollbar.htm#M13" NAME="L1004"><B>trough1</B></A>
|
||
|
<DD><A HREF="scrollbar.htm#M14" NAME="L1005"><B>slider</B></A>
|
||
|
<DD><A HREF="scrollbar.htm#M15" NAME="L1006"><B>trough2</B></A>
|
||
|
<DD><A HREF="scrollbar.htm#M16" NAME="L1007"><B>arrow2</B></A>
|
||
|
</DL>
|
||
|
<DD><A HREF="scrollbar.htm#M17" NAME="L1008">WIDGET COMMAND</A>
|
||
|
<DL>
|
||
|
<DD><A HREF="scrollbar.htm#M18" NAME="L1009"><I>pathName </I><B>activate </B>?<I>element</I>?</A>
|
||
|
<DD><A HREF="scrollbar.htm#M19" NAME="L1010"><I>pathName </I><B>cget</B> <I>option</I></A>
|
||
|
<DD><A HREF="scrollbar.htm#M20" NAME="L1011"><I>pathName </I><B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>?</A>
|
||
|
<DD><A HREF="scrollbar.htm#M21" NAME="L1012"><I>pathName </I><B>delta </B><I>deltaX deltaY</I></A>
|
||
|
<DD><A HREF="scrollbar.htm#M22" NAME="L1013"><I>pathName </I><B>fraction </B><I>x y</I></A>
|
||
|
<DD><A HREF="scrollbar.htm#M23" NAME="L1014"><I>pathName </I><B>get</B></A>
|
||
|
<DD><A HREF="scrollbar.htm#M24" NAME="L1015"><I>pathName </I><B>identify</B> <I>x y</I></A>
|
||
|
<DD><A HREF="scrollbar.htm#M25" NAME="L1016"><I>pathName </I><B>set</B> <I>first last</I></A>
|
||
|
</DL>
|
||
|
<DD><A HREF="scrollbar.htm#M26" NAME="L1017">SCROLLING COMMANDS</A>
|
||
|
<DL>
|
||
|
<DD><A HREF="scrollbar.htm#M27" NAME="L1018"><I>prefix </I><B>moveto </B><I>fraction</I></A>
|
||
|
<DD><A HREF="scrollbar.htm#M28" NAME="L1019"><I>prefix </I><B>scroll </B><I>number </I><B>units</B></A>
|
||
|
<DD><A HREF="scrollbar.htm#M29" NAME="L1020"><I>prefix </I><B>scroll </B><I>number </I><B>pages</B></A>
|
||
|
</DL>
|
||
|
<DD><A HREF="scrollbar.htm#M30" NAME="L1021">OLD COMMAND SYNTAX</A>
|
||
|
<DL>
|
||
|
<DD><A HREF="scrollbar.htm#M31" NAME="L1022"><I>pathName </I><B>set</B> <I>totalUnits windowUnits firstUnit lastUnit</I></A>
|
||
|
</DL>
|
||
|
<DL>
|
||
|
<DD><A HREF="scrollbar.htm#M32" NAME="L1023"><I>prefix</I> <I>unit</I></A>
|
||
|
</DL>
|
||
|
<DD><A HREF="scrollbar.htm#M33" NAME="L1024">BINDINGS</A>
|
||
|
<DL>
|
||
|
</DL>
|
||
|
<DD><A HREF="scrollbar.htm#M34" NAME="L1025">KEYWORDS</A>
|
||
|
</DL><HR>
|
||
|
<H3><A NAME="M2">NAME</A></H3>
|
||
|
scrollbar - Create and manipulate scrollbar widgets
|
||
|
<H3><A NAME="M3">SYNOPSIS</A></H3>
|
||
|
<B>scrollbar</B> <I>pathName </I>?<I>options</I>?<BR>
|
||
|
<H3><A NAME="M4">STANDARD OPTIONS</A></H3>
|
||
|
<DL>
|
||
|
<DT><B><A HREF="options.htm#M-activebackground">-activebackground, activeBackground, Foreground</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-background">-background or -bg, background, Background</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-borderwidth">-borderwidth or -bd, borderWidth, BorderWidth</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-cursor">-cursor, cursor, Cursor</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-highlightbackground">-highlightbackground, highlightBackground, HighlightBackground</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-highlightcolor">-highlightcolor, highlightColor, HighlightColor</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-highlightthickness">-highlightthickness, highlightThickness, HighlightThickness</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-jump">-jump, jump, Jump</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-orient">-orient, orient, Orient</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-relief">-relief, relief, Relief</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-repeatdelay">-repeatdelay, repeatDelay, RepeatDelay</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-repeatinterval">-repeatinterval, repeatInterval, RepeatInterval</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-takefocus">-takefocus, takeFocus, TakeFocus</A></B>
|
||
|
<DT><B><A HREF="options.htm#M-troughcolor">-troughcolor, troughColor, Background</A></B>
|
||
|
</DL>
|
||
|
<H3><A NAME="M5">WIDGET-SPECIFIC OPTIONS</A></H3>
|
||
|
<DL>
|
||
|
<DT>Command-Line Name: <B><A NAME="M6">-activerelief</A></B>
|
||
|
<DT>Database Name: <B>activeRelief</B>
|
||
|
<DT>Database Class: <B>ActiveRelief</B>
|
||
|
<DD>Specifies the relief to use when displaying the element that is
|
||
|
active, if any.
|
||
|
Elements other than the active element are always displayed with
|
||
|
a raised relief.
|
||
|
<P><DT>Command-Line Name: <B><A NAME="M7">-command</A></B>
|
||
|
<DT>Database Name: <B>command</B>
|
||
|
<DT>Database Class: <B>Command</B>
|
||
|
<DD>Specifies the prefix of a Tcl command to invoke to change the view
|
||
|
in the widget associated with the scrollbar. When a user requests
|
||
|
a view change by manipulating the scrollbar, a Tcl command is
|
||
|
invoked. The actual command consists of this option followed by
|
||
|
additional information as described later. This option almost always has
|
||
|
a value such as <B>.t xview</B> or <B>.t yview</B>, consisting of the
|
||
|
name of a widget and either <B>xview</B> (if the scrollbar is for
|
||
|
horizontal scrolling) or <B>yview</B> (for vertical scrolling).
|
||
|
All scrollable widgets have <B>xview</B> and <B>yview</B> commands
|
||
|
that take exactly the additional arguments appended by the scrollbar
|
||
|
as described in SCROLLING COMMANDS below.
|
||
|
<P><DT>Command-Line Name: <B><A NAME="M8">-elementborderwidth</A></B>
|
||
|
<DT>Database Name: <B>elementBorderWidth</B>
|
||
|
<DT>Database Class: <B>BorderWidth</B>
|
||
|
<DD>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 <B><A HREF="../TclLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||
|
If this value is less than zero, the value of the <B>borderWidth</B>
|
||
|
option is used in its place.
|
||
|
<P><DT>Command-Line Name: <B><A NAME="M9">-width</A></B>
|
||
|
<DT>Database Name: <B>width</B>
|
||
|
<DT>Database Class: <B>Width</B>
|
||
|
<DD>Specifies the desired narrow dimension of the scrollbar window,
|
||
|
not including 3-D border, if any. For vertical
|
||
|
scrollbars this will be the width and for horizontal scrollbars
|
||
|
this will be the height.
|
||
|
The value may have any of the forms acceptable to <B><A HREF="../TclLib/GetPixels.htm">Tk_GetPixels</A></B>.
|
||
|
</DL>
|
||
|
<H3><A NAME="M10">DESCRIPTION</A></H3>
|
||
|
The <B>scrollbar</B> command creates a new window (given by the
|
||
|
<I>pathName</I> argument) and makes it into a scrollbar widget.
|
||
|
Additional options, described above, may be specified on the command
|
||
|
line or in the option database to configure aspects of the scrollbar
|
||
|
such as its colors, orientation, and relief.
|
||
|
The <B>scrollbar</B> command returns its <I>pathName</I> argument.
|
||
|
At the time this command is invoked, there must not exist a window
|
||
|
named <I>pathName</I>, but <I>pathName</I>'s parent must exist.
|
||
|
<P>
|
||
|
A scrollbar is a widget that displays two arrows, one at each end of
|
||
|
the scrollbar, and a <I>slider</I> in the middle portion of the
|
||
|
scrollbar.
|
||
|
It provides information about what is visible in an <I>associated window</I>
|
||
|
that displays an document of some sort (such as a file being edited or
|
||
|
a drawing).
|
||
|
The position and size of the slider indicate which portion of the
|
||
|
document is visible in the associated window. For example, if the
|
||
|
slider in a vertical scrollbar covers the top third of the area
|
||
|
between the two arrows, it means that the associated window displays
|
||
|
the top third of its document.
|
||
|
<P>
|
||
|
Scrollbars can be used to adjust the view in the associated window
|
||
|
by clicking or dragging with the mouse. See the BINDINGS section
|
||
|
below for details.
|
||
|
|
||
|
<H3><A NAME="M11">ELEMENTS</A></H3>
|
||
|
A scrollbar displays five elements, which are referred to in the
|
||
|
widget commands for the scrollbar:
|
||
|
<P>
|
||
|
<DL>
|
||
|
<P><DT><A NAME="M12"><B>arrow1</B></A><DD>
|
||
|
The top or left arrow in the scrollbar.
|
||
|
<P><DT><A NAME="M13"><B>trough1</B></A><DD>
|
||
|
The region between the slider and <B>arrow1</B>.
|
||
|
<P><DT><A NAME="M14"><B>slider</B></A><DD>
|
||
|
The rectangle that indicates what is visible in the associated widget.
|
||
|
<P><DT><A NAME="M15"><B>trough2</B></A><DD>
|
||
|
The region between the slider and <B>arrow2</B>.
|
||
|
<P><DT><A NAME="M16"><B>arrow2</B></A><DD>
|
||
|
The bottom or right arrow in the scrollbar.
|
||
|
|
||
|
<P></DL>
|
||
|
<H3><A NAME="M17">WIDGET COMMAND</A></H3>
|
||
|
The <B>scrollbar</B> command creates a new Tcl command whose
|
||
|
name is <I>pathName</I>. This
|
||
|
command may be used to invoke various
|
||
|
operations on the widget. It has the following general form:
|
||
|
<PRE><I>pathName option </I>?<I>arg arg ...</I>?</PRE>
|
||
|
<I>Option</I> and the <I>arg</I>s
|
||
|
determine the exact behavior of the command. The following
|
||
|
commands are possible for scrollbar widgets:
|
||
|
<P>
|
||
|
<DL>
|
||
|
<P><DT><A NAME="M18"><I>pathName </I><B>activate </B>?<I>element</I>?</A><DD>
|
||
|
Marks the element indicated by <I>element</I> as active, which
|
||
|
causes it to be displayed as specified by the <B>activeBackground</B>
|
||
|
and <B>activeRelief</B> options.
|
||
|
The only element values understood by this command are <B>arrow1</B>,
|
||
|
<B>slider</B>, or <B>arrow2</B>.
|
||
|
If any other value is specified then no element of the scrollbar
|
||
|
will be active.
|
||
|
If <I>element</I> is not specified, the command returns
|
||
|
the name of the element that is currently active, or an empty string
|
||
|
if no element is active.
|
||
|
<P><DT><A NAME="M19"><I>pathName </I><B>cget</B> <I>option</I></A><DD>
|
||
|
Returns the current value of the configuration option given
|
||
|
by <I>option</I>.
|
||
|
<I>Option</I> may have any of the values accepted by the <B>scrollbar</B>
|
||
|
command.
|
||
|
<P><DT><A NAME="M20"><I>pathName </I><B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>?</A><DD>
|
||
|
Query or modify the configuration options of the widget.
|
||
|
If no <I>option</I> is specified, returns a list describing all of
|
||
|
the available options for <I>pathName</I> (see <B><A HREF="../TclLib/ConfigWidg.htm">Tk_ConfigureInfo</A></B> for
|
||
|
information on the format of this list). If <I>option</I> is specified
|
||
|
with no <I>value</I>, then the command returns a list describing the
|
||
|
one named option (this list will be identical to the corresponding
|
||
|
sublist of the value returned if no <I>option</I> is specified). If
|
||
|
one or more <I>option-value</I> pairs are specified, then the command
|
||
|
modifies the given widget option(s) to have the given value(s); in
|
||
|
this case the command returns an empty string.
|
||
|
<I>Option</I> may have any of the values accepted by the <B>scrollbar</B>
|
||
|
command.
|
||
|
<P><DT><A NAME="M21"><I>pathName </I><B>delta </B><I>deltaX deltaY</I></A><DD>
|
||
|
Returns a real number indicating the fractional change in
|
||
|
the scrollbar setting that corresponds to a given change
|
||
|
in slider position. For example, if the scrollbar is horizontal,
|
||
|
the result indicates how much the scrollbar setting must change
|
||
|
to move the slider <I>deltaX</I> pixels to the right (<I>deltaY</I> is
|
||
|
ignored in this case).
|
||
|
If the scrollbar is vertical, the result indicates how much the
|
||
|
scrollbar setting must change to move the slider <I>deltaY</I> pixels
|
||
|
down. The arguments and the result may be zero or negative.
|
||
|
<P><DT><A NAME="M22"><I>pathName </I><B>fraction </B><I>x y</I></A><DD>
|
||
|
Returns a real number between 0 and 1 indicating where the point
|
||
|
given by <I>x</I> and <I>y</I> lies in the trough area of the scrollbar.
|
||
|
The value 0 corresponds to the top or left of the trough, the
|
||
|
value 1 corresponds to the bottom or right, 0.5 corresponds to
|
||
|
the middle, and so on.
|
||
|
<I>X</I> and <I>y</I> must be pixel coordinates relative to the scrollbar
|
||
|
widget.
|
||
|
If <I>x</I> and <I>y</I> refer to a point outside the trough, the closest
|
||
|
point in the trough is used.
|
||
|
<P><DT><A NAME="M23"><I>pathName </I><B>get</B></A><DD>
|
||
|
Returns the scrollbar settings in the form of a list whose
|
||
|
elements are the arguments to the most recent <B>set</B> widget command.
|
||
|
<P><DT><A NAME="M24"><I>pathName </I><B>identify</B> <I>x y</I></A><DD>
|
||
|
Returns the name of the element under the point given by <I>x</I> and
|
||
|
<I>y</I> (such as <B>arrow1</B>), or an empty string if the point does
|
||
|
not lie in any element of the scrollbar.
|
||
|
<I>X</I> and <I>y</I> must be pixel coordinates relative to the scrollbar
|
||
|
widget.
|
||
|
<P><DT><A NAME="M25"><I>pathName </I><B>set</B> <I>first last</I></A><DD>
|
||
|
This command is invoked by the scrollbar's associated widget to
|
||
|
tell the scrollbar about the current view in the widget.
|
||
|
The command takes two arguments, each of which is a real fraction
|
||
|
between 0 and 1.
|
||
|
The fractions describe the range of the document that is visible in
|
||
|
the associated widget.
|
||
|
For example, if <I>first</I> is 0.2 and <I>last</I> 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.
|
||
|
|
||
|
<P></DL>
|
||
|
<H3><A NAME="M26">SCROLLING COMMANDS</A></H3>
|
||
|
When the user interacts with the scrollbar, for example by dragging
|
||
|
the slider, the scrollbar notifies the associated widget that it
|
||
|
must change its view.
|
||
|
The scrollbar makes the notification by evaluating a Tcl command
|
||
|
generated from the scrollbar's <B>-command</B> option.
|
||
|
The command may take any of the following forms.
|
||
|
In each case, <I>prefix</I> is the contents of the
|
||
|
<B>-command</B> option, which usually has a form like <B>.t yview</B>
|
||
|
<P>
|
||
|
<DL>
|
||
|
<P><DT><A NAME="M27"><I>prefix </I><B>moveto </B><I>fraction</I></A><DD>
|
||
|
<I>Fraction</I> is a real number between 0 and 1.
|
||
|
The widget should adjust its view so that the point given
|
||
|
by <I>fraction</I> appears at the beginning of the widget.
|
||
|
If <I>fraction</I> is 0 it refers to the beginning of the
|
||
|
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.
|
||
|
<P><DT><A NAME="M28"><I>prefix </I><B>scroll </B><I>number </I><B>units</B></A><DD>
|
||
|
The widget should adjust its view by <I>number</I> units.
|
||
|
The units are defined in whatever way makes sense for the widget,
|
||
|
such as characters or lines in a text widget.
|
||
|
<I>Number</I> 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.
|
||
|
<P><DT><A NAME="M29"><I>prefix </I><B>scroll </B><I>number </I><B>pages</B></A><DD>
|
||
|
The widget should adjust its view by <I>number</I> pages.
|
||
|
It is up to the widget to define the meaning of a page; typically
|
||
|
it is slightly less than what fits in the window, so that there
|
||
|
is a slight overlap between the old and new views.
|
||
|
<I>Number</I> is either 1, which means the next page should
|
||
|
become visible, or -1, which means that the previous page should
|
||
|
become visible.
|
||
|
|
||
|
<P></DL>
|
||
|
<H3><A NAME="M30">OLD COMMAND SYNTAX</A></H3>
|
||
|
In versions of Tk before 4.0, the <B>set</B> and <B>get</B> widget
|
||
|
commands used a different form.
|
||
|
This form is still supported for backward compatibility, but it
|
||
|
is deprecated.
|
||
|
In the old command syntax, the <B>set</B> widget command has the
|
||
|
following form:
|
||
|
<P>
|
||
|
<DL>
|
||
|
<P><DT><A NAME="M31"><I>pathName </I><B>set</B> <I>totalUnits windowUnits firstUnit lastUnit</I></A><DD>
|
||
|
In this form the arguments are all integers.
|
||
|
<I>TotalUnits</I> 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. <I>WindowUnits</I> indicates the total number of units that
|
||
|
can fit in the associated window at one time. <I>FirstUnit</I>
|
||
|
and <I>lastUnit</I> give the indices of the first and last units
|
||
|
currently visible in the associated window (zero corresponds to the
|
||
|
first unit of the object).
|
||
|
<P></DL>
|
||
|
<P>
|
||
|
Under the old syntax the <B>get</B> widget command returns a list
|
||
|
of four integers, consisting of the <I>totalUnits</I>, <I>windowUnits</I>,
|
||
|
<I>firstUnit</I>, and <I>lastUnit</I> values from the last <B>set</B>
|
||
|
widget command.
|
||
|
<P>
|
||
|
The commands generated by scrollbars also have a different form
|
||
|
when the old syntax is being used:
|
||
|
<P>
|
||
|
<DL>
|
||
|
<P><DT><A NAME="M32"><I>prefix</I> <I>unit</I></A><DD>
|
||
|
<I>Unit</I> 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 <I>firstUnit</I> and <I>lastUnit</I>
|
||
|
arguments to the <B>set</B> widget command.
|
||
|
<P></DL>
|
||
|
<P>
|
||
|
The most recent <B>set</B> 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.
|
||
|
|
||
|
<H3><A NAME="M33">BINDINGS</A></H3>
|
||
|
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.
|
||
|
|
||
|
<P>
|
||
|
<DL>
|
||
|
<P><DT>[1]<DD>
|
||
|
Pressing button 1 over <B>arrow1</B> causes the view in the
|
||
|
associated widget to shift up (left) by one unit so that the
|
||
|
document appears to move down (right) one unit.
|
||
|
If the button is held down, the action auto-repeats.
|
||
|
<P><DT>[2]<DD>
|
||
|
Pressing button 1 over <B>trough1</B> causes the view in the
|
||
|
associated widget to shift up (left) by one screenful so that the
|
||
|
document appears to move down (right) one screenful.
|
||
|
If the button is held down, the action auto-repeats.
|
||
|
<P><DT>[3]<DD>
|
||
|
Pressing button 1 over the slider and dragging causes the view
|
||
|
to drag with the slider.
|
||
|
If the <B>jump</B> option is true, then the view doesn't drag along
|
||
|
with the slider; it changes only when the mouse button is released.
|
||
|
<P><DT>[4]<DD>
|
||
|
Pressing button 1 over <B>trough2</B> causes the view in the
|
||
|
associated widget to shift down (right) by one screenful so that the
|
||
|
document appears to move up (left) one screenful.
|
||
|
If the button is held down, the action auto-repeats.
|
||
|
<P><DT>[5]<DD>
|
||
|
Pressing button 1 over <B>arrow2</B> causes the view in the
|
||
|
associated widget to shift down (right) by one unit so that the
|
||
|
document appears to move up (left) one unit.
|
||
|
If the button is held down, the action auto-repeats.
|
||
|
<P><DT>[6]<DD>
|
||
|
If button 2 is pressed over the trough or the slider, it sets
|
||
|
the view to correspond to the mouse position; dragging the
|
||
|
mouse with button 2 down causes the view to drag with the mouse.
|
||
|
If button 2 is pressed over one of the arrows, it causes the
|
||
|
same behavior as pressing button 1.
|
||
|
<P><DT>[7]<DD>
|
||
|
If button 1 is pressed with the Control key down, then if the
|
||
|
mouse is over <B>arrow1</B> or <B>trough1</B> the view changes
|
||
|
to the very top (left) of the document; if the mouse is over
|
||
|
<B>arrow2</B> or <B>trough2</B> the view changes
|
||
|
to the very bottom (right) of the document; if the mouse is
|
||
|
anywhere else then the button press has no effect.
|
||
|
<P><DT>[8]<DD>
|
||
|
In vertical scrollbars the Up and Down keys have the same behavior
|
||
|
as mouse clicks over <B>arrow1</B> and <B>arrow2</B>, respectively.
|
||
|
In horizontal scrollbars these keys have no effect.
|
||
|
<P><DT>[9]<DD>
|
||
|
In vertical scrollbars Control-Up and Control-Down have the same
|
||
|
behavior as mouse clicks over <B>trough1</B> and <B>trough2</B>, respectively.
|
||
|
In horizontal scrollbars these keys have no effect.
|
||
|
<P><DT>[10]<DD>
|
||
|
In horizontal scrollbars the Up and Down keys have the same behavior
|
||
|
as mouse clicks over <B>arrow1</B> and <B>arrow2</B>, respectively.
|
||
|
In vertical scrollbars these keys have no effect.
|
||
|
<P><DT>[11]<DD>
|
||
|
In horizontal scrollbars Control-Up and Control-Down have the same
|
||
|
behavior as mouse clicks over <B>trough1</B> and <B>trough2</B>, respectively.
|
||
|
In vertical scrollbars these keys have no effect.
|
||
|
<P><DT>[12]<DD>
|
||
|
The Prior and Next keys have the same behavior
|
||
|
as mouse clicks over <B>trough1</B> and <B>trough2</B>, respectively.
|
||
|
<P><DT>[13]<DD>
|
||
|
The Home key adjusts the view to the top (left edge) of the document.
|
||
|
<P><DT>[14]<DD>
|
||
|
The End key adjusts the view to the bottom (right edge) of the document.
|
||
|
|
||
|
<P></DL>
|
||
|
<H3><A NAME="M34">KEYWORDS</A></H3>
|
||
|
<A href="../Keywords/S.htm#scrollbar">scrollbar</A>, <A href="../Keywords/W.htm#widget">widget</A>
|
||
|
<HR><PRE>
|
||
|
<A HREF="../copyright.htm">Copyright</A> © 1990-1994 The Regents of the University of California.
|
||
|
<A HREF="../copyright.htm">Copyright</A> © 1994-1996 Sun Microsystems, Inc.
|
||
|
<A HREF="../copyright.htm">Copyright</A> © 1995-1997 Roger E. Critchlow Jr.</PRE>
|
||
|
</BODY></HTML>
|