1Table(3)              User Contributed Perl Documentation             Table(3)
2
3
4

NAME

6       Tk::Table - Scrollable 2 dimensional table of Tk widgets
7

SYNOPSIS

9         use Tk::Table;
10
11         $table = $parent->Table(-rows => number,
12                                 -columns => number,
13                                 -scrollbars => anchor,
14                                 -fixedrows => number,
15                                 -fixedcolumns => number,
16                                 -takefocus => boolean);
17
18         $widget = $table->Button(...);
19
20         $old = $table->put($row,$col,$widget);
21         $old = $table->put($row,$col,"Text");  # simple Label
22         $widget = $table->get($row,$col);
23
24         $cols = $table->totalColumns;
25         $rows = $table->totalRows;
26
27         $table->see($widget);
28         $table->see($row,$col);
29
30         ($row,$col) = $table->Posn($widget);
31

DESCRIPTION

33       Tk::Table is an all-perl widget/geometry manager which allows a two
34       dimensional table of arbitary perl/Tk widgets to be displayed.
35
36       Entries in the Table are simply ordinary perl/Tk widgets. They should
37       be created with the Table as their parent. Widgets are positioned in
38       the table using:
39
40        $table->put($row,$col,$widget)
41
42       If $widget is not a reference it is treated as a string, and a Lable
43       widget is created with the string as its text.
44
45       All the widgets in each column are set to the same width - the
46       requested width of the widest widget in the column.  Likewise, all the
47       widgets in each row are set to the same height - the requested height
48       of the tallest widget in the column.
49
50       A number of rows and/or columns can be marked as 'fixed' - and so can
51       serve as 'headings' for the remainder the rows which are scrollable.
52
53       The requested size of the table as a whole is such that the number of
54       rows specified by -rows (default 10), and number of columns specified
55       by -columns (default 10) can be displayed.
56
57       If the Table is told it can take the keyboard focus then cursor and
58       scroll keys scroll the displayed widgets.
59
60       The Table will create and manage its own scrollbars if requested via
61       -scrollbars.
62
63       The table can be emptied using
64
65        $table->clear
66
67       the widgets which were in the table are destroyed.
68
69       The Tk::Table widget is derived from a Tk::Frame, so inherits all its
70       configure options.
71

BUGS / Snags / Possible enhancements

73       ·   Very large Tables consume a lot of X windows.
74
75       ·   No equivalent of pack's -anchor/-pad etc. options
76

SEE ALSO

78       Tk::grid, Tk::HList, Tk::TableMatrix, Tk::MListbox, Tk::Columns
79
80
81
82perl v5.12.0                      2010-05-13                          Table(3)
Impressum