gdk_gc_new(your_widget->window) will allocate a graphics context that
you can use to draw a rectangle. You should call gdk_gc_unref() when you
are done with it.
Alternatively, you could just create a GtkEventBox and use
gtk_widget_modify_bg().
-Anthony Vallone
From: gtk-list-bounces@xxxxxxxxx [mailto:gtk-list-bounces@xxxxxxxxx] On Behalf Of nisha jain
Sent: Monday, March 31, 2008 2:22 PM
To: gtk-app-devel-list@xxxxxxxxx; gtk-list@xxxxxxxxx
Subject: Fwd: Query regarding drawing gtk_draw_rectangle API
Hi All,
I have to create a simple box filled with some color.
I am using the gdk_draw_rectangle API but it takes
gc graphics Context parameter. I am not able to find out
proper values for gc. I saw the scribble.c program available
but it is not compiling using gcc. Does some one has some
application which is using gtk_draw_rectangle(). I have gone
through its documentation but i am not able to make a simple
function using it....
Please if any one knows how to use this function and parameters
passed to GdkGC explain it.
Regards,
Nisha
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list