Niklas wrote:
> In gtk.py in GtkText there is
> 
>        def insert(self, font, fg, bg, string):
>                _gtk.gtk_text_insert(self._o, font, fg, bg, string,
>                                     len(string))
> 
> Could anyone tell me what kind of font this is? Following the
> Gtk-documentation I would say it should be a GdkFont but I can't 
seem to
> find this class reflected in the pygtk files, and GDK.py doesn't 
help out
> much.

I was just doing this, so the answer is right on the top of my head :-)
I do the following to get a text box with white background and black 
lettering with a helvetica font:

text_win = GtkText()
style = text_win.get_style()
fg = style.fg[STATE_NORMAL]
bg = style.white
font = load_font('-adobe-helvetica-medium-r-normal-*-*-80-*-*-*-*-*-*')

text_win.insert(font, fg, bg, "I like pyGtk")

Hope this helps,
Brad



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to