Re: non-interactive drawing area



On Sunday 24 August 2003 09:39, Carlos Pereira wrote:
I am new to GTK and I read the tutorial on www.gtk.org.
I want to use an area in my program, where I can draw things on,
e.g. rectangles or a diagram. It should be non-interactive,
means, the user should not be able to modify the area in any way
(no events). And the backgound should be white.

For plain DrawingArea examples, I suggest the scribble example
that comes with Gtk, and if you need something more elaborated,
you could look into Eric Harlow's example of a analog watch
made with DrawingArea, the code is free and you should be able
to find it with Google (perhaps it is at www.gtk.org, I don't
know).

This source is available at "www.newriders.com" - search for "gdk".  The clock 
examples are in ch10.gdk.clock/clock.  Expect to make the usual changes to 
port the code from 1.2 to 2.0.

Dave Smith





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]