Text wrapping ... some small issues
- From: Daniel Kasak <dkasak nusconsulting com au>
- To: gtk-perl-list gnome org
- Subject: Text wrapping ... some small issues
- Date: Tue, 17 Jul 2007 14:28:59 +1000
I'm playing with text wrapping in CellRendererText. It's mostly working
very well. There are a couple of places where the height of the cell
doesn't *quite* cover the full text, and I loose the last line, but this
isn't too important.
One thing that I noticed that *is* important, is that the height
calculation for text wrapping only appears to happen when the model is
updated. Is this correct?
For example, I set up a column with text wrapping ( 'word-char' mode,
and set the 'wrap-width' ) at application startup. Then I populate the
model ( and I assume text wrapping happens around this point ... maybe
the next time gtk2 renders ). Next, I resize the window down. When this
happens, I have code that re-sets the wrap-width to the new column
width. However, the text doesn't get re-wrapped ( or at least the height
doesn't get recalculated ) ... ie if it used to fit on 1 line, it
remains on 1 line. Conversely, if the window starts out small ( and some
text wraps ), and then I maximize it, the cell takes up the same height
as before, even if it now fits on 1 line.
Is there some way ( other than updating the model ) to force a
recalculation of the heights of rows?
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
] [Thread Prev