1Tk::Pane(3) perl/Tk Documentation Tk::Pane(3)
2
3
4
6 Tk::Pane - A window panner
7
9 use Tk::Pane;
10
11 $pane = $mw->Scrolled("Pane", Name => 'fred',
12 -scrollbars => 'soe',
13 -sticky => 'we',
14 -gridded => 'y'
15 );
16
17 $pane->Frame;
18
19 $pane->pack;
20
22 Tk::Pane provides a scrollable frame widget. Once created it can be
23 treated as a frame, except it is scrollable.
24
26 -gridded => direction
27 Specifies if the top and left edges of the pane should snap to a
28 grid column. This option is only useful if the widgets in the pane
29 are managed by the grid geometry manager. Possible values are x, y
30 and xy.
31
32 -sticky => style
33 If Pane is larger than its requested dimensions, this option may be
34 used to position (or stretch) the slave within its cavity. Style is
35 a string that contains zero or more of the characters n, s, e or w.
36 The string can optionally contains spaces or commas, but they are
37 ignored. Each letter refers to a side (north, south, east, or west)
38 that the slave will "stick" to. If both n and s (or e and w) are
39 specified, the slave will be stretched to fill the entire height
40 (or width) of its cavity.
41
43 $pane->see($widget ?,options?)
44 Adjusts the view so that $widget is visable. Aditional parameters
45 in options-value pairs can be passed, each option-value pair must
46 be one of the following
47
48 -anchor => anchor
49 Specifies how to make the widget visable. If not given then
50 as much of the widget as possible is made visable.
51
52 Possible values are n, s, w, e, nw, ne, sw and se. This
53 will cause an edge on the widget to be aligned with the
54 corresponding edge on the pane. for example nw will cause
55 the top left of the widget to be placed at the top left of
56 the pane. s will cause the bottom of the widget to be
57 placed at the bottom of the pane, and as much of the widget
58 as possible made visable in the x direction.
59
60 $pane->xview
61 Returns a list containing two elements, both of which are real
62 fractions between 0 and 1. The first element gives the position of
63 the left of the window, relative to the Pane as a whole (0.5 means
64 it is halfway through the Pane, for example). The second element
65 gives the position of the right of the window, relative to the Pane
66 as a whole.
67
68 $pane->xview($widget)
69 Adjusts the view in the window so that widget is displayed at the
70 left of the window.
71
72 $pane->xview(moveto => fraction)
73 Adjusts the view in the window so that fraction of the total width
74 of the Pane is off-screen to the left. fraction must be a fraction
75 between 0 and 1.
76
77 $pane->xview(scroll => number, what)
78 This command shifts the view in the window left or right according
79 to number and what. Number must be an integer. What must be either
80 units or pages or an abbreviation of one of these. If what is
81 units, the view adjusts left or right by number*10 screen units on
82 the display; if it is pages then the view adjusts by number
83 screenfuls. If number is negative then widgets farther to the left
84 become visible; if it is positive then widgets farther to the right
85 become visible.
86
87 $pane->yview
88 Returns a list containing two elements, both of which are real
89 fractions between 0 and 1. The first element gives the position of
90 the top of the window, relative to the Pane as a whole (0.5 means
91 it is halfway through the Pane, for example). The second element
92 gives the position of the bottom of the window, relative to the
93 Pane as a whole.
94
95 $pane->yview($widget)
96 Adjusts the view in the window so that widget is displayed at the
97 top of the window.
98
99 $pane->yview(moveto => fraction)
100 Adjusts the view in the window so that fraction of the total width
101 of the Pane is off-screen to the top. fraction must be a fraction
102 between 0 and 1.
103
104 $pane->yview(scroll => number, what)
105 This command shifts the view in the window up or down according to
106 number and what. Number must be an integer. What must be either
107 units or pages or an abbreviation of one of these. If what is
108 units, the view adjusts up or down by number*10 screen units on the
109 display; if it is pages then the view adjusts by number screenfuls.
110 If number is negative then widgets farther up become visible; if it
111 is positive then widgets farther down become visible.
112
114 Graham Barr <gbarr@pobox.com>
115
117 Copyright (c) 1997-1998 Graham Barr. All rights reserved. This program
118 is free software; you can redistribute it and/or modify it under the
119 same terms as Perl itself.
120
121
122
123Tk804.036 2023-01-20 Tk::Pane(3)