| 1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
| 2 | .\" |
| 3 | .\" Standard preamble: |
| 4 | .\" ======================================================================== |
| 5 | .de Sh \" Subsection heading |
| 6 | .br |
| 7 | .if t .Sp |
| 8 | .ne 5 |
| 9 | .PP |
| 10 | \fB\\$1\fR |
| 11 | .PP |
| 12 | .. |
| 13 | .de Sp \" Vertical space (when we can't use .PP) |
| 14 | .if t .sp .5v |
| 15 | .if n .sp |
| 16 | .. |
| 17 | .de Vb \" Begin verbatim text |
| 18 | .ft CW |
| 19 | .nf |
| 20 | .ne \\$1 |
| 21 | .. |
| 22 | .de Ve \" End verbatim text |
| 23 | .ft R |
| 24 | .fi |
| 25 | .. |
| 26 | .\" Set up some character translations and predefined strings. \*(-- will |
| 27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left |
| 28 | .\" double quote, and \*(R" will give a right double quote. | will give a |
| 29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to |
| 30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' |
| 31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. |
| 32 | .tr \(*W-|\(bv\*(Tr |
| 33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' |
| 34 | .ie n \{\ |
| 35 | . ds -- \(*W- |
| 36 | . ds PI pi |
| 37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch |
| 38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch |
| 39 | . ds L" "" |
| 40 | . ds R" "" |
| 41 | . ds C` "" |
| 42 | . ds C' "" |
| 43 | 'br\} |
| 44 | .el\{\ |
| 45 | . ds -- \|\(em\| |
| 46 | . ds PI \(*p |
| 47 | . ds L" `` |
| 48 | . ds R" '' |
| 49 | 'br\} |
| 50 | .\" |
| 51 | .\" If the F register is turned on, we'll generate index entries on stderr for |
| 52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index |
| 53 | .\" entries marked with X<> in POD. Of course, you'll have to process the |
| 54 | .\" output yourself in some meaningful fashion. |
| 55 | .if \nF \{\ |
| 56 | . de IX |
| 57 | . tm Index:\\$1\t\\n%\t"\\$2" |
| 58 | .. |
| 59 | . nr % 0 |
| 60 | . rr F |
| 61 | .\} |
| 62 | .\" |
| 63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 64 | .\" way too many mistakes in technical documents. |
| 65 | .hy 0 |
| 66 | .if n .na |
| 67 | .\" |
| 68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). |
| 69 | .\" Fear. Run. Save yourself. No user-serviceable parts. |
| 70 | . \" fudge factors for nroff and troff |
| 71 | .if n \{\ |
| 72 | . ds #H 0 |
| 73 | . ds #V .8m |
| 74 | . ds #F .3m |
| 75 | . ds #[ \f1 |
| 76 | . ds #] \fP |
| 77 | .\} |
| 78 | .if t \{\ |
| 79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) |
| 80 | . ds #V .6m |
| 81 | . ds #F 0 |
| 82 | . ds #[ \& |
| 83 | . ds #] \& |
| 84 | .\} |
| 85 | . \" simple accents for nroff and troff |
| 86 | .if n \{\ |
| 87 | . ds ' \& |
| 88 | . ds ` \& |
| 89 | . ds ^ \& |
| 90 | . ds , \& |
| 91 | . ds ~ ~ |
| 92 | . ds / |
| 93 | .\} |
| 94 | .if t \{\ |
| 95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" |
| 96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' |
| 97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' |
| 98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' |
| 99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' |
| 100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' |
| 101 | .\} |
| 102 | . \" troff and (daisy-wheel) nroff accents |
| 103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' |
| 104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' |
| 105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] |
| 106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' |
| 107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' |
| 108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] |
| 109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] |
| 110 | .ds ae a\h'-(\w'a'u*4/10)'e |
| 111 | .ds Ae A\h'-(\w'A'u*4/10)'E |
| 112 | . \" corrections for vroff |
| 113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' |
| 114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' |
| 115 | . \" for low resolution devices (crt and lpr) |
| 116 | .if \n(.H>23 .if \n(.V>19 \ |
| 117 | \{\ |
| 118 | . ds : e |
| 119 | . ds 8 ss |
| 120 | . ds o a |
| 121 | . ds d- d\h'-1'\(ga |
| 122 | . ds D- D\h'-1'\(hy |
| 123 | . ds th \o'bp' |
| 124 | . ds Th \o'LP' |
| 125 | . ds ae ae |
| 126 | . ds Ae AE |
| 127 | .\} |
| 128 | .rm #[ #] #H #V #F C |
| 129 | .\" ======================================================================== |
| 130 | .\" |
| 131 | .IX Title "SCROLLBAR 1" |
| 132 | .TH SCROLLBAR 1 "2000-12-30" "perl v5.8.0" "User Contributed Perl Documentation" |
| 133 | .SH "NAME" |
| 134 | Tk::Scrollbar \- Create and manipulate Scrollbar widgets |
| 135 | .SH "SYNOPSIS" |
| 136 | .IX Header "SYNOPSIS" |
| 137 | \&\fI$scrollbar\fR = \fI$parent\fR\->\fBScrollbar\fR(?\fIoptions\fR?); |
| 138 | .SH "STANDARD OPTIONS" |
| 139 | .IX Header "STANDARD OPTIONS" |
| 140 | \&\fB\-activebackground\fR \fB\-highlightbackground\fR \fB\-orient\fR \fB\-takefocus\fR |
| 141 | \&\fB\-background\fR \fB\-highlightcolor\fR \fB\-relief\fR \fB\-troughcolor\fR |
| 142 | \&\fB\-borderwidth\fR \fB\-highlightthickness\fR \fB\-repeatdelay\fR |
| 143 | \&\fB\-cursor\fR \fB\-jump\fR \fB\-repeatinterval\fR |
| 144 | .PP |
| 145 | See Tk::options for details of the standard options. |
| 146 | .SH "WIDGET-SPECIFIC OPTIONS" |
| 147 | .IX Header "WIDGET-SPECIFIC OPTIONS" |
| 148 | .IP "Name: \fBactiveRelief\fR" 4 |
| 149 | .IX Item "Name: activeRelief" |
| 150 | .PD 0 |
| 151 | .IP "Class: \fBActiveRelief\fR" 4 |
| 152 | .IX Item "Class: ActiveRelief" |
| 153 | .IP "Switch: \fB\-activerelief\fR" 4 |
| 154 | .IX Item "Switch: -activerelief" |
| 155 | .PD |
| 156 | Specifies the relief to use when displaying the element that is |
| 157 | active, if any. |
| 158 | Elements other than the active element are always displayed with |
| 159 | a raised relief. |
| 160 | .IP "Name: \fBcommand\fR" 4 |
| 161 | .IX Item "Name: command" |
| 162 | .PD 0 |
| 163 | .IP "Class: \fBCommand\fR" 4 |
| 164 | .IX Item "Class: Command" |
| 165 | .IP "Switch: \fB\-command\fR" 4 |
| 166 | .IX Item "Switch: -command" |
| 167 | .PD |
| 168 | Specifies a callback to invoke to change the view |
| 169 | in the widget associated with the scrollbar. When a user requests |
| 170 | a view change by manipulating the scrollbar, the callback is |
| 171 | invoked. The callback is passed |
| 172 | additional arguments as described later. This option almost always has |
| 173 | a value such as \fB[xview => \f(CB$widget\fB]\fR or \fB[yview => \f(CB$widget\fB]\fR, consisting of the |
| 174 | a widget object and either \fBxview\fR (if the scrollbar is for |
| 175 | horizontal scrolling) or \fByview\fR (for vertical scrolling). |
| 176 | All scrollable widgets have \fBxview\fR and \fByview\fR methods |
| 177 | that take exactly the additional arguments appended by the scrollbar |
| 178 | as described in \*(L"\s-1SCROLLING\s0 \s-1COMMANDS\s0\*(R" below. |
| 179 | .IP "Name: \fBelementBorderWidth\fR" 4 |
| 180 | .IX Item "Name: elementBorderWidth" |
| 181 | .PD 0 |
| 182 | .IP "Class: \fBBorderWidth\fR" 4 |
| 183 | .IX Item "Class: BorderWidth" |
| 184 | .IP "Switch: \fB\-elementborderwidth\fR" 4 |
| 185 | .IX Item "Switch: -elementborderwidth" |
| 186 | .PD |
| 187 | Specifies the width of borders drawn around the internal elements |
| 188 | of the scrollbar (the two arrows and the slider). The value may |
| 189 | have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 190 | If this value is less than zero, the value of the \fBborderWidth\fR |
| 191 | option is used in its place. |
| 192 | .IP "Name: \fBwidth\fR" 4 |
| 193 | .IX Item "Name: width" |
| 194 | .PD 0 |
| 195 | .IP "Class: \fBWidth\fR" 4 |
| 196 | .IX Item "Class: Width" |
| 197 | .IP "Switch: \fB\-width\fR" 4 |
| 198 | .IX Item "Switch: -width" |
| 199 | .PD |
| 200 | Specifies the desired narrow dimension of the scrollbar window, |
| 201 | not including 3\-D border, if any. For vertical |
| 202 | scrollbars this will be the width and for horizontal scrollbars |
| 203 | this will be the height. |
| 204 | The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 205 | .SH "DESCRIPTION" |
| 206 | .IX Header "DESCRIPTION" |
| 207 | The \fBScrollbar\fR method creates a new window (given by the |
| 208 | \&\f(CW$widget\fR argument) and makes it into a scrollbar widget. |
| 209 | Additional options, described above, may be specified on the command |
| 210 | line or in the option database to configure aspects of the scrollbar |
| 211 | such as its colors, orientation, and relief. |
| 212 | The \fBscrollbar\fR command returns its \f(CW$widget\fR argument. |
| 213 | At the time this command is invoked, there must not exist a window |
| 214 | named \f(CW$widget\fR, but \f(CW$widget\fR's parent must exist. |
| 215 | .PP |
| 216 | A scrollbar is a widget that displays two arrows, one at each end of |
| 217 | the scrollbar, and a \fIslider\fR in the middle portion of the |
| 218 | scrollbar. |
| 219 | It provides information about what is visible in an \fIassociated window\fR |
| 220 | that displays an document of some sort (such as a file being edited or |
| 221 | a drawing). |
| 222 | The position and size of the slider indicate which portion of the |
| 223 | document is visible in the associated window. For example, if the |
| 224 | slider in a vertical scrollbar covers the top third of the area |
| 225 | between the two arrows, it means that the associated window displays |
| 226 | the top third of its document. |
| 227 | .PP |
| 228 | Scrollbars can be used to adjust the view in the associated window |
| 229 | by clicking or dragging with the mouse. |
| 230 | See \*(L"\s-1BINDINGS\s0\*(R" below for details. |
| 231 | .SH "ELEMENTS" |
| 232 | .IX Header "ELEMENTS" |
| 233 | A scrollbar displays five elements, which are referred to in the |
| 234 | methods for the scrollbar: |
| 235 | .IP "\fBarrow1\fR" 4 |
| 236 | .IX Item "arrow1" |
| 237 | The top or left arrow in the scrollbar. |
| 238 | .IP "\fBtrough1\fR" 4 |
| 239 | .IX Item "trough1" |
| 240 | The region between the slider and \fBarrow1\fR. |
| 241 | .IP "\fBslider\fR" 4 |
| 242 | .IX Item "slider" |
| 243 | The rectangle that indicates what is visible in the associated widget. |
| 244 | .IP "\fBtrough2\fR" 4 |
| 245 | .IX Item "trough2" |
| 246 | The region between the slider and \fBarrow2\fR. |
| 247 | .IP "\fBarrow2\fR" 4 |
| 248 | .IX Item "arrow2" |
| 249 | The bottom or right arrow in the scrollbar. |
| 250 | .SH "WIDGET METHODS" |
| 251 | .IX Header "WIDGET METHODS" |
| 252 | The \fBScrollbar\fR method creates a widget object. |
| 253 | This object supports the \fBconfigure\fR and \fBcget\fR methods |
| 254 | described in Tk::options which can be used to enquire and |
| 255 | modify the options described above. |
| 256 | The widget also inherits all the methods provided by the generic |
| 257 | Tk::Widget class. |
| 258 | .PP |
| 259 | The following additional methods are available for scrollbar widgets: |
| 260 | .IP "\fI$scrollbar\fR\->\fBactivate\fR(?\fIelement\fR?)" 4 |
| 261 | .IX Item "$scrollbar->activate(?element?)" |
| 262 | Marks the element indicated by \fIelement\fR as active, which |
| 263 | causes it to be displayed as specified by the \fBactiveBackground\fR |
| 264 | and \fBactiveRelief\fR options. |
| 265 | The only element values understood by this command are \fBarrow1\fR, |
| 266 | \&\fBslider\fR, or \fBarrow2\fR. |
| 267 | If any other value is specified then no element of the scrollbar |
| 268 | will be active. |
| 269 | If \fIelement\fR is not specified, the command returns |
| 270 | the name of the element that is currently active, or an empty string |
| 271 | if no element is active. |
| 272 | .IP "\fI$scrollbar\fR\->\fBdelta\fR(\fIdeltaX, deltaY\fR)" 4 |
| 273 | .IX Item "$scrollbar->delta(deltaX, deltaY)" |
| 274 | Returns a real number indicating the fractional change in |
| 275 | the scrollbar setting that corresponds to a given change |
| 276 | in slider position. For example, if the scrollbar is horizontal, |
| 277 | the result indicates how much the scrollbar setting must change |
| 278 | to move the slider \fIdeltaX\fR pixels to the right (\fIdeltaY\fR is |
| 279 | ignored in this case). |
| 280 | If the scrollbar is vertical, the result indicates how much the |
| 281 | scrollbar setting must change to move the slider \fIdeltaY\fR pixels |
| 282 | down. The arguments and the result may be zero or negative. |
| 283 | .IP "\fI$scrollbar\fR\->\fBfraction\fR(\fIx, y\fR)" 4 |
| 284 | .IX Item "$scrollbar->fraction(x, y)" |
| 285 | Returns a real number between 0 and 1 indicating where the point |
| 286 | given by \fIx\fR and \fIy\fR lies in the trough area of the scrollbar. |
| 287 | The value 0 corresponds to the top or left of the trough, the |
| 288 | value 1 corresponds to the bottom or right, 0.5 corresponds to |
| 289 | the middle, and so on. |
| 290 | \&\fIX\fR and \fIy\fR must be pixel coordinates relative to the scrollbar |
| 291 | widget. |
| 292 | If \fIx\fR and \fIy\fR refer to a point outside the trough, the closest |
| 293 | point in the trough is used. |
| 294 | .IP "\fI$scrollbar\fR\->\fBget\fR" 4 |
| 295 | .IX Item "$scrollbar->get" |
| 296 | Returns the scrollbar settings in the form of a list whose |
| 297 | elements are the arguments to the most recent \fBset\fR method. |
| 298 | .IP "\fI$scrollbar\fR\->\fBidentify\fR(\fIx, y\fR)" 4 |
| 299 | .IX Item "$scrollbar->identify(x, y)" |
| 300 | Returns the name of the element under the point given by \fIx\fR and |
| 301 | \&\fIy\fR (such as \fBarrow1\fR), or an empty string if the point does |
| 302 | not lie in any element of the scrollbar. |
| 303 | \&\fIX\fR and \fIy\fR must be pixel coordinates relative to the scrollbar |
| 304 | widget. |
| 305 | .IP "\fI$scrollbar\fR\->\fBset\fR(\fIfirst, last\fR)" 4 |
| 306 | .IX Item "$scrollbar->set(first, last)" |
| 307 | This command is invoked by the scrollbar's associated widget to |
| 308 | tell the scrollbar about the current view in the widget. |
| 309 | The command takes two arguments, each of which is a real fraction |
| 310 | between 0 and 1. |
| 311 | The fractions describe the range of the document that is visible in |
| 312 | the associated widget. |
| 313 | For example, if \fIfirst\fR is 0.2 and \fIlast\fR is 0.4, it means |
| 314 | that the first part of the document visible in the window is 20% |
| 315 | of the way through the document, and the last visible part is 40% |
| 316 | of the way through. |
| 317 | .SH "SCROLLING COMMANDS" |
| 318 | .IX Header "SCROLLING COMMANDS" |
| 319 | When the user interacts with the scrollbar, for example by dragging |
| 320 | the slider, the scrollbar notifies the associated widget that it |
| 321 | must change its view. |
| 322 | The scrollbar makes the notification by evaluating a callback |
| 323 | specified as the scrollbar's \fB\-command\fR option. |
| 324 | The callback may take several forms. |
| 325 | In each case, the intial arguments passed are those |
| 326 | specified in the \fB\-command\fR callback itself, |
| 327 | which usually has a form like [\fByview\fR => \fI$widget\fR]. |
| 328 | (Which will invoke \fI$widget\fR\->\fByview\fR(...) where |
| 329 | the ... part is as below. See Tk::callbacks for details.) |
| 330 | The callback is passed additional arguments as follows: |
| 331 | .IP "\fBmoveto\fR,\fIfraction\fR" 4 |
| 332 | .IX Item "moveto,fraction" |
| 333 | \&\fIFraction\fR is a real number between 0 and 1. |
| 334 | The widget should adjust its view so that the point given |
| 335 | by \fIfraction\fR appears at the beginning of the widget. |
| 336 | If \fIfraction\fR is 0 it refers to the beginning of the |
| 337 | document. 1.0 refers to the end of the document, 0.333 |
| 338 | refers to a point one-third of the way through the document, |
| 339 | and so on. |
| 340 | .IP "\fBscroll,\fR\fInumber,\fR\fBunits\fR" 4 |
| 341 | .IX Item "scroll,number,units" |
| 342 | The widget should adjust its view by \fInumber\fR units. |
| 343 | The units are defined in whatever way makes sense for the widget, |
| 344 | such as characters or lines in a text widget. |
| 345 | \&\fINumber\fR is either 1, which means one unit should scroll off |
| 346 | the top or left of the window, or \-1, which means that one unit |
| 347 | should scroll off the bottom or right of the window. |
| 348 | .IP "\fBscroll\fR,\fInumber\fR,\fBpage\fR" 4 |
| 349 | .IX Item "scroll,number,page" |
| 350 | The widget should adjust its view by \fInumber\fR pages. |
| 351 | It is up to the widget to define the meaning of a page; typically |
| 352 | it is slightly less than what fits in the window, so that there |
| 353 | is a slight overlap between the old and new views. |
| 354 | \&\fINumber\fR is either 1, which means the next page should |
| 355 | become visible, or \-1, which means that the previous page should |
| 356 | become visible. |
| 357 | .SH "OLD COMMAND SYNTAX" |
| 358 | .IX Header "OLD COMMAND SYNTAX" |
| 359 | In versions of Tk before 4.0, the \fBset\fR and \fBget\fR widget |
| 360 | commands used a different form. |
| 361 | This form is still supported for backward compatibility, but it |
| 362 | is deprecated. |
| 363 | In the old command syntax, the \fBset\fR method has the |
| 364 | following form: |
| 365 | .IP "\fI$scrollbar\fR\->\fBset\fR(\fItotalUnits, windowUnits, firstUnit, lastUnit\fR)" 4 |
| 366 | .IX Item "$scrollbar->set(totalUnits, windowUnits, firstUnit, lastUnit)" |
| 367 | In this form the arguments are all integers. |
| 368 | \&\fITotalUnits\fR gives the total size of the object being displayed in the |
| 369 | associated widget. The meaning of one unit depends on the associated |
| 370 | widget; for example, in a text editor widget units might |
| 371 | correspond to lines of |
| 372 | text. \fIWindowUnits\fR indicates the total number of units that |
| 373 | can fit in the associated window at one time. \fIFirstUnit\fR |
| 374 | and \fIlastUnit\fR give the indices of the first and last units |
| 375 | currently visible in the associated window (zero corresponds to the |
| 376 | first unit of the object). |
| 377 | .PP |
| 378 | Under the old syntax the \fBget\fR method returns a list |
| 379 | of four integers, consisting of the \fItotalUnits\fR, \fIwindowUnits\fR, |
| 380 | \&\fIfirstUnit\fR, and \fIlastUnit\fR values from the last \fBset\fR |
| 381 | method. |
| 382 | .PP |
| 383 | The callbacks generated by scrollbars also have a different form |
| 384 | when the old syntax is being used, the callback is passed a single argument: |
| 385 | .IP "\fIunit\fR" 4 |
| 386 | .IX Item "unit" |
| 387 | \&\fIUnit\fR is an integer that indicates what should appear at |
| 388 | the top or left of the associated widget's window. |
| 389 | It has the same meaning as the \fIfirstUnit\fR and \fIlastUnit\fR |
| 390 | arguments to the \fBset\fR method. |
| 391 | .PP |
| 392 | The most recent \fBset\fR method determines whether or not |
| 393 | to use the old syntax. |
| 394 | If it is given two real arguments then the new syntax will be |
| 395 | used in the future, and if it is given four integer arguments then |
| 396 | the old syntax will be used. |
| 397 | .SH "BINDINGS" |
| 398 | .IX Header "BINDINGS" |
| 399 | Tk automatically creates class bindings for scrollbars that give them |
| 400 | the following default behavior. |
| 401 | If the behavior is different for vertical and horizontal scrollbars, |
| 402 | the horizontal behavior is described in parentheses. |
| 403 | .IP "[1]" 4 |
| 404 | .IX Item "[1]" |
| 405 | Pressing button 1 over \fBarrow1\fR causes the view in the |
| 406 | associated widget to shift up (left) by one unit so that the |
| 407 | document appears to move down (right) one unit. |
| 408 | If the button is held down, the action auto\-repeats. |
| 409 | .IP "[2]" 4 |
| 410 | .IX Item "[2]" |
| 411 | Pressing button 1 over \fBtrough1\fR causes the view in the |
| 412 | associated widget to shift up (left) by one screenful so that the |
| 413 | document appears to move down (right) one screenful. |
| 414 | If the button is held down, the action auto\-repeats. |
| 415 | .IP "[3]" 4 |
| 416 | .IX Item "[3]" |
| 417 | Pressing button 1 over the slider and dragging causes the view |
| 418 | to drag with the slider. |
| 419 | If the \fBjump\fR option is true, then the view doesn't drag along |
| 420 | with the slider; it changes only when the mouse button is released. |
| 421 | .IP "[4]" 4 |
| 422 | .IX Item "[4]" |
| 423 | Pressing button 1 over \fBtrough2\fR causes the view in the |
| 424 | associated widget to shift down (right) by one screenful so that the |
| 425 | document appears to move up (left) one screenful. |
| 426 | If the button is held down, the action auto\-repeats. |
| 427 | .IP "[5]" 4 |
| 428 | .IX Item "[5]" |
| 429 | Pressing button 1 over \fBarrow2\fR causes the view in the |
| 430 | associated widget to shift down (right) by one unit so that the |
| 431 | document appears to move up (left) one unit. |
| 432 | If the button is held down, the action auto\-repeats. |
| 433 | .IP "[6]" 4 |
| 434 | .IX Item "[6]" |
| 435 | If button 2 is pressed over the trough or the slider, it sets |
| 436 | the view to correspond to the mouse position; dragging the |
| 437 | mouse with button 2 down causes the view to drag with the mouse. |
| 438 | If button 2 is pressed over one of the arrows, it causes the |
| 439 | same behavior as pressing button 1. |
| 440 | .IP "[7]" 4 |
| 441 | .IX Item "[7]" |
| 442 | If button 1 is pressed with the Control key down, then if the |
| 443 | mouse is over \fBarrow1\fR or \fBtrough1\fR the view changes |
| 444 | to the very top (left) of the document; if the mouse is over |
| 445 | \&\fBarrow2\fR or \fBtrough2\fR the view changes |
| 446 | to the very bottom (right) of the document; if the mouse is |
| 447 | anywhere else then the button press has no effect. |
| 448 | .IP "[8]" 4 |
| 449 | .IX Item "[8]" |
| 450 | In vertical scrollbars the Up and Down keys have the same behavior |
| 451 | as mouse clicks over \fBarrow1\fR and \fBarrow2\fR, respectively. |
| 452 | In horizontal scrollbars these keys have no effect. |
| 453 | .IP "[9]" 4 |
| 454 | .IX Item "[9]" |
| 455 | In vertical scrollbars Control-Up and Control-Down have the same |
| 456 | behavior as mouse clicks over \fBtrough1\fR and \fBtrough2\fR, respectively. |
| 457 | In horizontal scrollbars these keys have no effect. |
| 458 | .IP "[10]" 4 |
| 459 | .IX Item "[10]" |
| 460 | In horizontal scrollbars the Up and Down keys have the same behavior |
| 461 | as mouse clicks over \fBarrow1\fR and \fBarrow2\fR, respectively. |
| 462 | In vertical scrollbars these keys have no effect. |
| 463 | .IP "[11]" 4 |
| 464 | .IX Item "[11]" |
| 465 | In horizontal scrollbars Control-Up and Control-Down have the same |
| 466 | behavior as mouse clicks over \fBtrough1\fR and \fBtrough2\fR, respectively. |
| 467 | In vertical scrollbars these keys have no effect. |
| 468 | .IP "[12]" 4 |
| 469 | .IX Item "[12]" |
| 470 | The Prior and Next keys have the same behavior |
| 471 | as mouse clicks over \fBtrough1\fR and \fBtrough2\fR, respectively. |
| 472 | .IP "[13]" 4 |
| 473 | .IX Item "[13]" |
| 474 | The Home key adjusts the view to the top (left edge) of the document. |
| 475 | .IP "[14]" 4 |
| 476 | .IX Item "[14]" |
| 477 | The End key adjusts the view to the bottom (right edge) of the document. |
| 478 | .SH "SEE ALSO" |
| 479 | .IX Header "SEE ALSO" |
| 480 | Tk::callbacks |
| 481 | Tk::Scrolled |
| 482 | .SH "KEYWORDS" |
| 483 | .IX Header "KEYWORDS" |
| 484 | scrollbar, widget |