Tk::Pane(3) | perl/Tk Documentation | Tk::Pane(3) |
NAME¶
Tk::Pane - A window panner
SYNOPSIS¶
use Tk::Pane; $pane = $mw->Scrolled("Pane", Name => 'fred', -scrollbars => 'soe', -sticky => 'we', -gridded => 'y' ); $pane->Frame; $pane->pack;
DESCRIPTION¶
Tk::Pane provides a scrollable frame widget. Once created it can be treated as a frame, except it is scrollable.
OPTIONS¶
- -gridded => direction
- Specifies if the top and left edges of the pane should snap to a grid column. This option is only useful if the widgets in the pane are managed by the grid geometry manager. Possible values are x, y and xy.
- -sticky => style
- If Pane is larger than its requested dimensions, this option may be used to position (or stretch) the slave within its cavity. Style is a string that contains zero or more of the characters n, s, e or w. The string can optionally contains spaces or commas, but they are ignored. Each letter refers to a side (north, south, east, or west) that the slave will "stick" to. If both n and s (or e and w) are specified, the slave will be stretched to fill the entire height (or width) of its cavity.
METHODS¶
- $pane->see($widget ?,options?)
- Adjusts the view so that $widget is visable. Aditional parameters in options-value pairs can be passed, each option-value pair must be one of the following
- -anchor => anchor
- Specifies how to make the widget visable. If not given then as much of the
widget as possible is made visable.
Possible values are n, s, w, e, nw, ne, sw and se. This will cause an edge on the widget to be aligned with the corresponding edge on the pane. for example nw will cause the top left of the widget to be placed at the top left of the pane. s will cause the bottom of the widget to be placed at the bottom of the pane, and as much of the widget as possible made visable in the x direction.
- $pane->xview
- Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the left of the window, relative to the Pane as a whole (0.5 means it is halfway through the Pane, for example). The second element gives the position of the right of the window, relative to the Pane as a whole.
- $pane->xview($widget)
- Adjusts the view in the window so that widget is displayed at the left of the window.
- $pane->xview(moveto => fraction)
- Adjusts the view in the window so that fraction of the total width of the Pane is off-screen to the left. fraction must be a fraction between 0 and 1.
- $pane->xview(scroll => number, what)
- This command shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number*10 screen units on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then widgets farther to the left become visible; if it is positive then widgets farther to the right become visible.
- $pane->yview
- Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the top of the window, relative to the Pane as a whole (0.5 means it is halfway through the Pane, for example). The second element gives the position of the bottom of the window, relative to the Pane as a whole.
- $pane->yview($widget)
- Adjusts the view in the window so that widget is displayed at the top of the window.
- $pane->yview(moveto => fraction)
- Adjusts the view in the window so that fraction of the total width of the Pane is off-screen to the top. fraction must be a fraction between 0 and 1.
- $pane->yview(scroll => number, what)
- This command shifts the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts up or down by number*10 screen units on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then widgets farther up become visible; if it is positive then widgets farther down become visible.
AUTHOR¶
Graham Barr <gbarr@pobox.com>
COPYRIGHT¶
Copyright (c) 1997-1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2021-04-05 | Tk804.034 |