Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: TableMatrix multilineby PeterPeiGuo (Hermit) |
on Jan 15, 2011 at 01:18 UTC ( [id://882432]=note: print w/replies, xml ) | Need Help?? |
It looks like that TableMatrix does not support auto-resize. But it won't be too difficult for you to calculate the number of lines that the text of a cell occupies. To simplify the matter: 1) don't auto-resize the width (use ColWidth function to get the current width of a cell), and only auto-resize the height; 2) Measure height and width in characters, not pixels. When you calculate the number of lines, don't forget to handle special characters like \n. Call RowHeight to resize the cell (height only). Peter (Guo) Pei
In Section
Seekers of Perl Wisdom
|
|