[pygtk] ellipsized label in alignments
Erik Grinaker
erikg at codepoet.no
Sat Jul 22 20:38:48 WST 2006
Hi,
I'm having some problems using ellipsized labels inside an alignment.
Take the attached example, what I want is to have a table which is
centered in the window. I also want the value in the right column to be
ellipsized if it is too long (ie, if it is bigger than the window).
As you can see, the whole label is ellipsized even though it has plenty
of room to expand. The solution to this is, of course, to set xscale to
1 for the gtk.Alignment and add the gtk.EXPAND flag to
gtk.Table.attach(). However, this causes the table to appear
left-justified, and no longer centered.
So is there a way to make the ellipsized label request the exact space
it requires but no more, while still being ellipsized when bigger than
the window?
--
Erik Grinaker <erikg at codepoet.no>
http://erikg.codepoet.no/
"We act as though comfort and luxury were the chief requirements of
life, when all that we need to make us happy is something to be
enthusiastic about."
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ellipsize.py
Type: text/x-python
Size: 509 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20060722/2a007257/ellipsize.py
More information about the pygtk
mailing list