
3. Widget Scroll Commands 7
2. Perl/Tk Special Variables
$Tk::library
Directory containing library of Tk modules, widgets, and
scripts.
$Tk::patchLevel
Integer specifying current patch level for Tcl/Tk.
$Tk::strictMotif
When non-zero, Tk tries to adhere to Motif look-and-feel
as closely as possible.
$Tk::version
Current version of Tcl/Tk that Perl/Tk is based on, in
major.minor form.
$Tk::VERSION
Current version of Perl/Tk.
3. Widget Scroll Commands
The Canvas, Listbox, and Text widgets support the following
scrolling commands. The Entry widget supports the xview
command and the scan command with the y coordinate
dropped.
Refer to the section Perl/Tk Widgets and learn how the Perl/
Tk widget Scrolled greatly simplifies managing scrollbars.
$widget->scanMark(x, y);
Records x and y as widget’s current view anchor.
$widget->scanDragto(x, y);
Shifts the view by 10 times the difference between
the coordinates x and y and the current view anchor
coordinates.
$widget->xview;
Returns a two-element list specifying the fraction of the
horizontal span of the widget at the left and right edges
of the window.