Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "Table 3" | |
132 | .TH Table 3 "2003-08-22" "perl v5.8.0" "User Contributed Perl Documentation" | |
133 | .SH "NAME" | |
134 | HTML::Table \- produces HTML tables | |
135 | .SH "SYNOPSIS" | |
136 | .IX Header "SYNOPSIS" | |
137 | .Vb 1 | |
138 | \& use HTML::Table; | |
139 | .Ve | |
140 | .PP | |
141 | .Vb 17 | |
142 | \& $table1 = new HTML::Table($rows, $cols); | |
143 | \& or | |
144 | \& $table1 = new HTML::Table(-rows=>26, | |
145 | \& -cols=>2, | |
146 | \& -align=>'center', | |
147 | \& -rules=>'rows', | |
148 | \& -border=>0, | |
149 | \& -bgcolor=>'blue', | |
150 | \& -width=>'50%', | |
151 | \& -spacing=>0, | |
152 | \& -padding=>0, | |
153 | \& -style=>'color: blue', | |
154 | \& -class=>'myclass', | |
155 | \& -head=> ['head1', 'head2'], | |
156 | \& -data=> [ ['1:1', '1:2'], ['2:1', '2:2'] ] ); | |
157 | \& or | |
158 | \& $table1 = new HTML::Table( [ ['1:1', '1:2'], ['2:1', '2:2'] ] ); | |
159 | .Ve | |
160 | .PP | |
161 | .Vb 5 | |
162 | \& $table1->setCell($cellrow, $cellcol, 'This is Cell 1'); | |
163 | \& $table1->setCellBGColor('blue'); | |
164 | \& $table1->setCellColSpan(1, 1, 2); | |
165 | \& $table1->setRowHead(1); | |
166 | \& $table1->setColHead(1); | |
167 | .Ve | |
168 | .PP | |
169 | .Vb 1 | |
170 | \& $table1->print; | |
171 | .Ve | |
172 | .PP | |
173 | .Vb 3 | |
174 | \& $table2 = new HTML::Table; | |
175 | \& $table2->addRow(@cell_values); | |
176 | \& $table2->addCol(@cell_values2); | |
177 | .Ve | |
178 | .PP | |
179 | .Vb 2 | |
180 | \& $table1->setCell(1,1, "$table2->getTable"); | |
181 | \& $table1->print; | |
182 | .Ve | |
183 | .SH "REQUIRES" | |
184 | .IX Header "REQUIRES" | |
185 | Perl5.002 | |
186 | .SH "EXPORTS" | |
187 | .IX Header "EXPORTS" | |
188 | Nothing | |
189 | .SH "DESCRIPTION" | |
190 | .IX Header "DESCRIPTION" | |
191 | HTML::Table is used to generate \s-1HTML\s0 tables for | |
192 | \&\s-1CGI\s0 scripts. By using the methods provided fairly | |
193 | complex tables can be created, manipulated, then printed | |
194 | from Perl scripts. The module also greatly simplifies | |
195 | creating tables within tables from Perl. It is possible | |
196 | to create an entire table using the methods provided and | |
197 | never use an \s-1HTML\s0 tag. | |
198 | .PP | |
199 | HTML::Table also allows for creating dynamically sized | |
200 | tables via its addRow and addCol methods. These methods | |
201 | automatically resize the table if passed more cell values | |
202 | than will fit in the current table grid. | |
203 | .PP | |
204 | Methods are provided for nearly all valid table, row, and | |
205 | cell tags specified for \s-1HTML\s0 3.0. | |
206 | .PP | |
207 | A Japanese translation of the documentation is available at: | |
208 | .PP | |
209 | .Vb 1 | |
210 | \& http://member.nifty.ne.jp/hippo2000/perltips/html/table.htm | |
211 | .Ve | |
212 | .SH "METHODS" | |
213 | .IX Header "METHODS" | |
214 | .Vb 2 | |
215 | \& [] indicate optional parameters. default value will | |
216 | \& be used if no value is specified | |
217 | .Ve | |
218 | .Sh "Creation" | |
219 | .IX Subsection "Creation" | |
220 | .IP "new HTML::Table([num_rows, num_cols])" 4 | |
221 | .IX Item "new HTML::Table([num_rows, num_cols])" | |
222 | Creates a new \s-1HTML\s0 table object. If rows and columns | |
223 | are specified, the table will be initialized to that | |
224 | size. Row and Column numbers start at 1,1. 0,0 is | |
225 | considered an empty table. | |
226 | .IP "new HTML::Table([\-rows=>num_rows, \-cols=>num_cols, \-border=>border_width, \-align=>table_alignment, \-style=>table_style, \-class=>table_class, \-bgcolor=>back_colour, \-width=>table_width, \-spacing=>cell_spacing, \-padding=>cell_padding])" 4 | |
227 | .IX Item "new HTML::Table([-rows=>num_rows, -cols=>num_cols, -border=>border_width, -align=>table_alignment, -style=>table_style, -class=>table_class, -bgcolor=>back_colour, -width=>table_width, -spacing=>cell_spacing, -padding=>cell_padding])" | |
228 | Creates a new \s-1HTML\s0 table object. If rows and columns | |
229 | are specified, the table will be initialized to that | |
230 | size. Row and Column numbers start at 1,1. 0,0 is | |
231 | considered an empty table. | |
232 | .Sh "Table Level Methods" | |
233 | .IX Subsection "Table Level Methods" | |
234 | .IP "setBorder([pixels])" 4 | |
235 | .IX Item "setBorder([pixels])" | |
236 | Sets the table Border Width | |
237 | .IP "setWidth([pixels|percentofscreen])" 4 | |
238 | .IX Item "setWidth([pixels|percentofscreen])" | |
239 | Sets the table width | |
240 | .Sp | |
241 | .Vb 3 | |
242 | \& $table->setWidth(500); | |
243 | \& or | |
244 | \& $table->setWidth('100%'); | |
245 | .Ve | |
246 | .IP "setCellSpacing([pixels])" 4 | |
247 | .IX Item "setCellSpacing([pixels])" | |
248 | .PD 0 | |
249 | .IP "setCellPadding([pixels])" 4 | |
250 | .IX Item "setCellPadding([pixels])" | |
251 | .ie n .IP "setCaption(""CaptionText"" [, TOP|BOTTOM])" 4 | |
252 | .el .IP "setCaption(``CaptionText'' [, TOP|BOTTOM])" 4 | |
253 | .IX Item "setCaption(CaptionText [, TOP|BOTTOM])" | |
254 | .IP "setBGColor([colorname|colortriplet])" 4 | |
255 | .IX Item "setBGColor([colorname|colortriplet])" | |
256 | .IP "autoGrow([1|true|on|anything|0|false|off|no|disable])" 4 | |
257 | .IX Item "autoGrow([1|true|on|anything|0|false|off|no|disable])" | |
258 | .PD | |
259 | Switches on (default) or off automatic growing of the table | |
260 | if row or column values passed to setCell exceed current | |
261 | table size. | |
262 | .IP "setAlign ( [ \s-1LEFT\s0 , \s-1CENTER\s0 , \s-1RIGHT\s0 ] )" 4 | |
263 | .IX Item "setAlign ( [ LEFT , CENTER , RIGHT ] )" | |
264 | .PD 0 | |
265 | .IP "setRules ( [ \s-1ROWS\s0 , \s-1COLS\s0 , \s-1ALL\s0, \s-1BOTH\s0 , \s-1GROUPS\s0 ] )" 4 | |
266 | .IX Item "setRules ( [ ROWS , COLS , ALL, BOTH , GROUPS ] )" | |
267 | .IP "setStyle ( 'css style' )" 4 | |
268 | .IX Item "setStyle ( 'css style' )" | |
269 | .PD | |
270 | Sets the table style attribute. | |
271 | .IP "setClass ( 'css class' )" 4 | |
272 | .IX Item "setClass ( 'css class' )" | |
273 | Sets the table class attribute. | |
274 | .IP "setAttr ( 'user attribute' )" 4 | |
275 | .IX Item "setAttr ( 'user attribute' )" | |
276 | Sets a user defined attribute for the table. Useful for when | |
277 | HTML::Table hasn't implemented a particular attribute yet | |
278 | .IP "sort ( [sort_col_num, sort_type, sort_order, num_rows_to_skip] )" 4 | |
279 | .IX Item "sort ( [sort_col_num, sort_type, sort_order, num_rows_to_skip] )" | |
280 | .Vb 8 | |
281 | \& or | |
282 | \& sort( -sort_col => sort_col_num, | |
283 | \& -sort_type => sort_type, | |
284 | \& -sort_order => sort_order, | |
285 | \& -skip_rows => num_rows_to_skip, | |
286 | \& -strip_html => strip_html, | |
287 | \& -strip_non_numeric => strip_non_numeric, | |
288 | \& -presort_func => \e&filter_func ) | |
289 | .Ve | |
290 | .Sp | |
291 | .Vb 4 | |
292 | \& sort_type in { ALPHA | NUMERIC }, | |
293 | \& sort_order in { ASC | DESC }, | |
294 | \& strip_html in { 0 | 1 }, defaults to 1, | |
295 | \& strip_non_numeric in { 0 | 1 }, defaults to 1 | |
296 | .Ve | |
297 | .Sp | |
298 | .Vb 2 | |
299 | \& Sort all rows on a given column (optionally skipping table header rows | |
300 | \& by specifiying num_rows_to_skip). | |
301 | .Ve | |
302 | .Sp | |
303 | .Vb 2 | |
304 | \& By default sorting ignores HTML Tags and  , setting the strip_html parameter to 0 | |
305 | \& disables this behaviour. | |
306 | .Ve | |
307 | .Sp | |
308 | .Vb 2 | |
309 | \& By default numeric Sorting ignores non numeric chararacters, setting the strip_non_numeric | |
310 | \& parameter to 0 disables this behaviour. | |
311 | .Ve | |
312 | .Sp | |
313 | .Vb 2 | |
314 | \& You can provide your own pre-sort function, useful for pre-processing the cell contents | |
315 | \& before sorting for example dates. | |
316 | .Ve | |
317 | .IP "getTableRows" 4 | |
318 | .IX Item "getTableRows" | |
319 | Returns the number of rows in the table. | |
320 | .IP "getTableCols" 4 | |
321 | .IX Item "getTableCols" | |
322 | Returns the number of columns in the table. | |
323 | .Sh "Cell Level Methods" | |
324 | .IX Subsection "Cell Level Methods" | |
325 | .ie n .IP "setCell(row_num, col_num, ""content"")" 4 | |
326 | .el .IP "setCell(row_num, col_num, ``content'')" 4 | |
327 | .IX Item "setCell(row_num, col_num, content)" | |
328 | Sets the content of a table cell. This could be any | |
329 | string, even another table object via the getTable method. | |
330 | If the row and/or column numbers are outside the existing table | |
331 | boundaries extra rows and/or columns are created automatically. | |
332 | .IP "setCellAlign(row_num, col_num, [CENTER|RIGHT|LEFT])" 4 | |
333 | .IX Item "setCellAlign(row_num, col_num, [CENTER|RIGHT|LEFT])" | |
334 | Sets the horizontal alignment for the cell. | |
335 | .IP "setCellVAlign(row_num, col_num, [CENTER|TOP|BOTTOM|MIDDLE|BASELINE])" 4 | |
336 | .IX Item "setCellVAlign(row_num, col_num, [CENTER|TOP|BOTTOM|MIDDLE|BASELINE])" | |
337 | Sets the vertical alignment for the cell. | |
338 | .IP "setCellWidth(row_num, col_num, [pixels|percentoftable])" 4 | |
339 | .IX Item "setCellWidth(row_num, col_num, [pixels|percentoftable])" | |
340 | Sets the width of the cell. | |
341 | .IP "setCellHeight(row_num, col_num, [pixels])" 4 | |
342 | .IX Item "setCellHeight(row_num, col_num, [pixels])" | |
343 | Sets the height of the cell. | |
344 | .IP "setCellHead(row_num, col_num)" 4 | |
345 | .IX Item "setCellHead(row_num, col_num)" | |
346 | Sets cell to be of type head (Ie <th></th>) | |
347 | .IP "setCellNoWrap(row_num, col_num, [0|1])" 4 | |
348 | .IX Item "setCellNoWrap(row_num, col_num, [0|1])" | |
349 | Sets the NoWrap attribute of the cell. | |
350 | .IP "setCellBGColor(row_num, col_num, [colorname|colortriplet])" 4 | |
351 | .IX Item "setCellBGColor(row_num, col_num, [colorname|colortriplet])" | |
352 | Sets the background colour for the cell | |
353 | .IP "setCellRowSpan(row_num, col_num, num_cells)" 4 | |
354 | .IX Item "setCellRowSpan(row_num, col_num, num_cells)" | |
355 | Causes the cell to overlap a number of cells below it. | |
356 | If the overlap number is greater than number of cells | |
357 | below the cell, a false value will be returned. | |
358 | .IP "setCellColSpan(row_num, col_num, num_cells)" 4 | |
359 | .IX Item "setCellColSpan(row_num, col_num, num_cells)" | |
360 | Causes the cell to overlap a number of cells to the right. | |
361 | If the overlap number is greater than number of cells to | |
362 | the right of the cell, a false value will be returned. | |
363 | .IP "setCellSpan(row_num, col_num, num_rows, num_cols)" 4 | |
364 | .IX Item "setCellSpan(row_num, col_num, num_rows, num_cols)" | |
365 | Joins the block of cells with the starting cell specified. | |
366 | The joined area will be num_cols wide and num_rows deep. | |
367 | .IP "setCellFormat(row_num, col_num, start_string, end_string)" 4 | |
368 | .IX Item "setCellFormat(row_num, col_num, start_string, end_string)" | |
369 | Start_string should be a string of valid \s-1HTML\s0, which is output before | |
370 | the cell contents, end_string is valid \s-1HTML\s0 that is output after the cell contents. | |
371 | This enables formatting to be applied to the cell contents. | |
372 | .Sp | |
373 | .Vb 1 | |
374 | \& $table->setCellFormat(1, 2, '<b>', '</b>'); | |
375 | .Ve | |
376 | .IP "setCellStyle (row_num, col_num, 'css style')" 4 | |
377 | .IX Item "setCellStyle (row_num, col_num, 'css style')" | |
378 | Sets the cell style attribute. | |
379 | .IP "setCellClass (row_num, col_num, 'css class')" 4 | |
380 | .IX Item "setCellClass (row_num, col_num, 'css class')" | |
381 | Sets the cell class attribute. | |
382 | .IP "setCellAttr (row_num, col_num, 'user attribute')" 4 | |
383 | .IX Item "setCellAttr (row_num, col_num, 'user attribute')" | |
384 | Sets a user defined attribute for the cell. Useful for when | |
385 | HTML::Table hasn't implemented a particular attribute yet | |
386 | .IP "getCell(row_num, col_num)" 4 | |
387 | .IX Item "getCell(row_num, col_num)" | |
388 | Returns the contents of the specified cell as a string. | |
389 | .Sh "Column Level Methods" | |
390 | .IX Subsection "Column Level Methods" | |
391 | .ie n .IP "addCol(""cell 1 content"" [, ""cell 2 content"", ...])" 4 | |
392 | .el .IP "addCol(``cell 1 content'' [, ``cell 2 content'', ...])" 4 | |
393 | .IX Item "addCol(cell 1 content [, cell 2 content, ...])" | |
394 | Adds a column to the right end of the table. Assumes if | |
395 | you pass more values than there are rows that you want | |
396 | to increase the number of rows. | |
397 | .IP "setColAlign(col_num, [CENTER|RIGHT|LEFT])" 4 | |
398 | .IX Item "setColAlign(col_num, [CENTER|RIGHT|LEFT])" | |
399 | Applies setCellAlign over the entire column. | |
400 | .IP "setColVAlign(col_num, [CENTER|TOP|BOTTOM|MIDDLE|BASELINE])" 4 | |
401 | .IX Item "setColVAlign(col_num, [CENTER|TOP|BOTTOM|MIDDLE|BASELINE])" | |
402 | Applies setCellVAlign over the entire column. | |
403 | .IP "setColWidth(col_num, [pixels|percentoftable])" 4 | |
404 | .IX Item "setColWidth(col_num, [pixels|percentoftable])" | |
405 | Applies setCellWidth over the entire column. | |
406 | .IP "setColHeight(col_num, [pixels])" 4 | |
407 | .IX Item "setColHeight(col_num, [pixels])" | |
408 | Applies setCellHeight over the entire column. | |
409 | .IP "setColHead(col_num)" 4 | |
410 | .IX Item "setColHead(col_num)" | |
411 | Applies setCellHead over the entire column. | |
412 | .IP "setColNoWrap(col_num, [0|1])" 4 | |
413 | .IX Item "setColNoWrap(col_num, [0|1])" | |
414 | Applies setCellNoWrap over the entire column. | |
415 | .IP "setColBGColor(row_num, [colorname|colortriplet])" 4 | |
416 | .IX Item "setColBGColor(row_num, [colorname|colortriplet])" | |
417 | Applies setCellBGColor over the entire column. | |
418 | .IP "setColFormat(col_num, start_string, end_sting)" 4 | |
419 | .IX Item "setColFormat(col_num, start_string, end_sting)" | |
420 | Applies setCellFormat over the entire column. | |
421 | .IP "setColStyle (col_num, 'css style')" 4 | |
422 | .IX Item "setColStyle (col_num, 'css style')" | |
423 | Applies setCellStyle over the entire column. | |
424 | .IP "setColClass (col_num, 'css class')" 4 | |
425 | .IX Item "setColClass (col_num, 'css class')" | |
426 | Applies setCellClass over the entire column. | |
427 | .IP "setColAttr (col_num, 'user attribute')" 4 | |
428 | .IX Item "setColAttr (col_num, 'user attribute')" | |
429 | Applies setCellAttr over the entire column. | |
430 | .Sh "Row Level Methods" | |
431 | .IX Subsection "Row Level Methods" | |
432 | .ie n .IP "addRow(""cell 1 content"" [, ""cell 2 content"", ...])" 4 | |
433 | .el .IP "addRow(``cell 1 content'' [, ``cell 2 content'', ...])" 4 | |
434 | .IX Item "addRow(cell 1 content [, cell 2 content, ...])" | |
435 | Adds a row to the bottom of the table. Assumes if you | |
436 | pass more values than there are columns that you want | |
437 | to increase the number of columns. | |
438 | .IP "setRowAlign(row_num, [CENTER|RIGHT|LEFT])" 4 | |
439 | .IX Item "setRowAlign(row_num, [CENTER|RIGHT|LEFT])" | |
440 | Applies setCellAlign over the entire row. | |
441 | .IP "setRowVAlign(row_num, [CENTER|TOP|BOTTOM|MIDDLE|BASELINE])" 4 | |
442 | .IX Item "setRowVAlign(row_num, [CENTER|TOP|BOTTOM|MIDDLE|BASELINE])" | |
443 | Applies setCellVAlign over the entire row. | |
444 | .IP "setRowWidth(row_num, [pixels|percentoftable])" 4 | |
445 | .IX Item "setRowWidth(row_num, [pixels|percentoftable])" | |
446 | Applies setCellWidth over the entire row. | |
447 | .IP "setRowHeight(row_num, [pixels])" 4 | |
448 | .IX Item "setRowHeight(row_num, [pixels])" | |
449 | Applies setCellHeight over the entire row. | |
450 | .IP "setRowHead(row_num)" 4 | |
451 | .IX Item "setRowHead(row_num)" | |
452 | Applies setCellHead over the entire row. | |
453 | .IP "setRowNoWrap(col_num, [0|1])" 4 | |
454 | .IX Item "setRowNoWrap(col_num, [0|1])" | |
455 | Applies setCellNoWrap over the entire row. | |
456 | .IP "setRowBGColor(row_num, [colorname|colortriplet])" 4 | |
457 | .IX Item "setRowBGColor(row_num, [colorname|colortriplet])" | |
458 | Applies setCellBGColor over the entire row. | |
459 | .IP "setRowFormat(row_num, start_string, end_string)" 4 | |
460 | .IX Item "setRowFormat(row_num, start_string, end_string)" | |
461 | Applies setCellFormat over the entire row. | |
462 | .IP "setRowStyle (row_num, 'css style')" 4 | |
463 | .IX Item "setRowStyle (row_num, 'css style')" | |
464 | Applies setCellStyle over the entire row. | |
465 | .IP "setRowClass (row_num, 'css class')" 4 | |
466 | .IX Item "setRowClass (row_num, 'css class')" | |
467 | Applies setCellClass over the entire row. | |
468 | .IP "setRowAttr (row_num, 'user attribute')" 4 | |
469 | .IX Item "setRowAttr (row_num, 'user attribute')" | |
470 | Applies setCellAttr over the entire row. | |
471 | .Sh "Output Methods" | |
472 | .IX Subsection "Output Methods" | |
473 | .IP "getTable" 4 | |
474 | .IX Item "getTable" | |
475 | Returns a string containing the \s-1HTML\s0 representation | |
476 | of the table. | |
477 | .Sp | |
478 | The same effect can also be achieved by using the object reference | |
479 | in a string scalar context. | |
480 | .Sp | |
481 | For example... | |
482 | .Sp | |
483 | .Vb 1 | |
484 | \& This code snippet: | |
485 | .Ve | |
486 | .Sp | |
487 | .Vb 4 | |
488 | \& $table = new HTML::Table(2, 2); | |
489 | \& print '<p>Start</p>'; | |
490 | \& print $table->getTable; | |
491 | \& print '<p>End</p>'; | |
492 | .Ve | |
493 | .Sp | |
494 | .Vb 1 | |
495 | \& would produce the same output as: | |
496 | .Ve | |
497 | .Sp | |
498 | .Vb 2 | |
499 | \& $table = new HTML::Table(2, 2); | |
500 | \& print "<p>Start</p>$table<p>End</p>"; | |
501 | .Ve | |
502 | .IP "print" 4 | |
503 | .IX Item "print" | |
504 | Prints \s-1HTML\s0 representation of the table to \s-1STDOUT\s0 | |
505 | .SH "CLASS VARIABLES" | |
506 | .IX Header "CLASS VARIABLES" | |
507 | .SH "HISTORY" | |
508 | .IX Header "HISTORY" | |
509 | This module was originally created in 1997 by Stacy Lacy and whose last | |
510 | version was uploaded to \s-1CPAN\s0 in 1998. The module was adopted in July 2000 | |
511 | by Anthony Peacock in order to distribute a revised version. This adoption | |
512 | took place without the explicit consent of Stacy Lacy as it proved impossible | |
513 | to contact them at the time. Although explicit consent was not obtained at | |
514 | the time, there was some evidence that Stacy Lacy was looking for somebody | |
515 | to adopt the module in 1998. | |
516 | .SH "AUTHOR" | |
517 | .IX Header "AUTHOR" | |
518 | Anthony Peacock, a.peacock@chime.ucl.ac.uk | |
519 | Stacy Lacy (Original author) | |
520 | .SH "CONTRIBUTIONS" | |
521 | .IX Header "CONTRIBUTIONS" | |
522 | Jay Flaherty, fty@mediapulse.com | |
523 | For \s-1ROW\s0, \s-1COL\s0 & \s-1CELL\s0 \s-1HEAD\s0 methods. Modified the new method to allow hash of values. | |
524 | .PP | |
525 | John Stumbles, john@uk.stumbles.org | |
526 | For autogrow behaviour of setCell, and allowing alignment specifications to be case insensitive | |
527 | .PP | |
528 | Arno Teunisse, Arno.Teunisse@Simac.nl | |
529 | For the methods adding rules, styles and table alignment attributes. | |
530 | .PP | |
531 |