Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: TableMatrix multiline

by PeterPeiGuo (Hermit)
on Jan 15, 2011 at 01:18 UTC ( [id://882432]=note: print w/replies, xml ) Need Help??


in reply to TableMatrix multiline

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://882432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found