Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / Table.pod
CommitLineData
86530b38
AT
1
2=head1 NAME
3
4Tk::Table - Scrollable 2 dimensional table of Tk widgets
5
6=for pm Tk/Table.pm
7
8=for category Tk Geometry Management
9
10=head1 SYNOPSIS
11
12 use Tk::Table;
13
14 $table = $parent->Table(-rows => number,
15 -columns => number,
16 -scrollbars => anchor,
17 -fixedrows => number,
18 -fixedcolumns => number,
19 -takefocus => boolean);
20
21 $widget = $table->Button(...);
22
23 $old = $table->put($row,$col,$widget);
24 $old = $table->put($row,$col,"Text"); # simple Label
25 $widget = $table->get($row,$col);
26
27 $cols = $table->totalColumns;
28 $rows = $table->totalRows;
29
30 $table->see($widget);
31 $table->see($row,$col);
32
33 ($row,$col) = $table->Posn($widget);
34
35=head1 DESCRIPTION
36
37Tk::Table is an all-perl widget/geometry manager which allows a two dimensional
38table of arbitary perl/Tk widgets to be displayed.
39
40Entries in the Table are simply ordinary perl/Tk widgets. They should
41be created with the Table as their parent. Widgets are positioned in the
42table using:
43
44 $table->put($row,$col,$widget)
45
46All the widgets in each column are set to the same width - the requested
47width of the widest widget in the column.
48Likewise, all the widgets in each row are set to the same height - the requested
49height of the tallest widget in the column.
50
51A number of rows and/or columns can be marked as 'fixed' - and so can serve
52as 'headings' for the remainder the rows which are scrollable.
53
54The requested size of the table as a whole is such that the number of rows
55specified by -rows (default 10), and number of columns specified by -columns
56(default 10) can be displayed.
57
58If the Table is told it can take the keyboard focus then cursor and scroll
59keys scroll the displayed widgets.
60
61The Table will create and manage its own scrollbars if requested via
62-scrollbars.
63
64The Tk::Table widget is derived from a Tk::Frame, so inherits all its
65configure options.
66
67=head1 BUGS / Snags / Possible enhancements
68
69=over 4
70
71=item *
72
73Very large Tables consume a lot of X windows
74
75=item *
76
77No equivalent of pack's -anchor/-pad etc. options
78
79=back
80
81=cut
82