Thank you so much. The code now reads:

elif image.get_name()=="text":

text=image.get_children()[0].get_child().get_children()[0]

pangoText=text.get_parent().create_pango_layout(text.get_text())
                    #pangoText.set_text(text)

point=image.get_children()[0].get_child().get_children()[2]

xcoord=point.get_children()[0].get_children()[0].get_children()[0].get_children()[1].get_value_as_int()

ycoord=point.get_children()[0].get_children()[0].get_children()[0].get_children()[3].get_value_as_int()

drawingArea.draw_layout(gtk.gdk.GC(drawingArea),xcoord,ycoord,pangoText)

No more banging my head against the wall.

Thanks again,
Rebecca R.G.

On Thu, Jul 31, 2008 at 11:21 AM, Gian Mario Tagliaretti
<[EMAIL PROTECTED]>wrote:

> 2008/7/31 Rebecca Rebhuhn-Glanz <[EMAIL PROTECTED]>:
>
> Hi Rebecca,
>
> >                     pangoText=pango.Layout(pango.Context())
>
> I guess the problem is here, you shouldn't create a pango context but
> get the one of the parent widget instead:
>
> http://www.pygtk.org/docs/pygtk/class-gtkwidget.html#method-gtkwidget--get-pango-context
>
> cheers
> --
> Gian Mario Tagliaretti
> GNOME Foundation member
> [EMAIL PROTECTED]
>
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to