[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: WHY: (gtk_draw_point ) assertion `GDK_IS_DRAWABLE (drawable)'failed ?
- From: iain <iain prettypeople org>
- To: manu aradhya <manu_aradhya yahoo co in>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: WHY: (gtk_draw_point ) assertion `GDK_IS_DRAWABLE (drawable)'failed ?
- Date: Sat, 27 Sep 2003 14:17:31 +0100
On Sat, 2003-09-27 at 14:11, manu aradhya wrote:
> da = gtk_drawing_area_new ();
> gtk_drawing_area_size (GTK_DRAWING_AREA (da), 60,
> 60);
> gtk_widget_show (da);
> gtk_container_add (GTK_CONTAINER (fixed), da);
> gdk_draw_point (da->window, da->style->black_gc,
> x,
> y);
> gdk_draw_point (da->window, da->style->black_gc,
> x, y);
>
> gtk_container_add (GTK_CONTAINER(window),fixed);
> gtk_widget_set_size_request (window,500,400);
> gtk_widget_show_all (window);
> gtk_main ();
>
> Ian now also it is failing why?
2 things:
a) You need to realize widgets before they can be drawn on. Doing a
gtk_widget_show_all on the toplevel window will do it for you, or you
can force it by calling gtk_widget_realize.
b) You can only do drawing in the expose_event callback otherwise it
won't show up.
iain
--
"Miss Celine Dion sings lovesongs while our cities burn"
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]