[pygtk] Getting string with in pixels
Vladimír Jícha
vladovi at atlas.cz
Fri Feb 13 20:40:09 WST 2009
Hello,
I'm trying to get width of a text string. I found a FAQ 4.15
(http://faq.pygtk.org/index.py?req=show&file=faq04.015.htp) which has a
solution for this. But unfortunately it doesn't work. If I use "font =
widget.get_style().font", I get following error message: AttributeError:
'gtk.Style' has no attribute 'font'.
Is the FAQ outdated? What syntax should I use?
Thank you
More information about the pygtk
mailing list