[Sugar-devel] Turtle Art in GNOME 3

Walter Bender walter.bender at gmail.com
Mon Apr 11 20:33:04 EDT 2011


For some reason, when I try to access the window of my drawable area,
it is coming back as None. I wonder if this is something that has
somehow changed in GNOME 3.

A DrawingArea is created using the constructor:

  drawing_area = gtk.DrawingArea()

A DrawingArea is initially created with a size of (0, 0) so you should
use the following method to make the drawing_area visible by setting
its width and height to useful values greater than zero:

  drawing_area.set_size_request(width, height)

To draw on a DrawingArea you must retrieve the wrapped gtk.gdk.Window
using the window attribute of the DrawingArea as follows:

  drawable = drawing_area.window

But drawable (which I call area in my code) is None.

I'll keep poking around.

-walter

-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org


More information about the Sugar-devel mailing list