[pygtk] Default font/style for text view

markus espenhain me at mocisoft.com
Wed Feb 6 09:53:02 WST 2008


On Wed, 2008-02-06 at 11:16 +1100, Stephen George wrote:
> Hi All,
> 
> Can't work out how to set a default font/style for a text view.
> 
> I want to set the font bold and larger, user will not have option to 
> change it.
> 
> Is there a way?
> 

yes ...

tv = gtk.TextView()
tv.modify_font(pango.FontDescription('sans bold 26'))

http://www.pygtk.org/docs/pygtk/class-gtkwidget.html#method-gtkwidget--modify-font
http://www.pygtk.org/docs/pygtk/class-pangofontdescription.html

> Steve
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



More information about the pygtk mailing list