[Gtk-sharp-list] Exposes Constantly

Mike Kestner mkestner at ximian.com
Thu Dec 13 12:35:22 EST 2007


On Thu, 2007-12-13 at 09:22 -0500, Adam Tauno Williams wrote:

> I see the "Draw: ... " message non-stop.

The most common cause is an invalidation in the expose routine which
basically creates a tight loop.

> This is the first time I've used DrawingArea or Cairo as I'm not a
> graphics guy at all,  but I really need a weekview calendar widget for
> Gtk# and none seem to be available.   So far Cairo seems very nice to
> use, and fast;  I've been able to draw hour lines and day columns,
> etc...  but the documentation on some of the gritty details is rather
> sparse.

For something like a calendar widget, I would use Gtk.Style instead of
going directly to cairo, since then your widget is more likely to look
integrated for people using different themes.  If you are interested in
seeing how something like that can be done, there is a Calendar view in
my toy fitness log app.

http://exert.svn.sourceforge.net/viewvc/exert/trunk/exert/src/CalendarView.cs?revision=66&view=markup

There's a screenshot of it in action:

http://sourceforge.net/project/screenshots.php?group_id=161797

-- 
Mike Kestner <mkestner at ximian.com>



More information about the Gtk-sharp-list mailing list