PDA

View Full Version : PyGTK text


Ubuntuud
July 4th, 2006, 04:27 AM
Hi,
I'm working on a webpage generator. It wasn't graphical at first, but I started working on it. I found an excellent tutorial, but I don't know how to insert the most basic, text. How do you insert text like in the attached screenshot?

(The "Uw systeem is up-to-date" etc.)

Daverz
July 4th, 2006, 05:54 AM
Is this the sort of thing that you are looking for?

http://www.pygtk.org/pygtk2tutorial/sec-TextBuffers.html#id3121630

Ubuntuud
July 4th, 2006, 06:14 AM
I don't know actualy. Isn't there a normal widget to contain text? Text buffers are much to hard for my program, I think I'll use labels. Thanks anyway!

Daverz
July 4th, 2006, 06:24 AM
Yeah, just plain labels should work fine for presenting text that's not editable.
You use also HTML-like markup in labels using either set_markup() or set_use_markup() and set_text().

http://pygtk.org/pygtk2reference/pango-markup-language.html

Ubuntuud
July 4th, 2006, 09:05 AM
OK. Thanks again!