in reply to Re^2: Auto-adjust row height to line wrap in Tk-Tablematrix
in thread Auto-adjust row height to line wrap in Tk-Tablematrix
This seems to assume that there are \n characters in the strings. I am using -wrap => 1, to get automatic line wraps, and I don't think that it inserts \n in the string.
Hm. I could be wrong, but I'd bet my bottom dollar that wrap is implemented by inserting newlines into the text.
This part of the tcl code:if {[set n [llength [split [.table get $r,$c] \n]]]>1 && $maxh<$n} { breaks down to:
(Note: that first test is redundant.)
You would be wasting your time doing font calculations yourself, cos the tablematrix must already be doing them in order to perform the wrapping.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Auto-adjust row height to line wrap in Tk-Tablematrix
by elef (Friar) on Feb 09, 2013 at 18:15 UTC | |
by BrowserUk (Patriarch) on Feb 10, 2013 at 12:56 UTC | |
by elef (Friar) on Feb 10, 2013 at 15:04 UTC |