--- (gtk_draw_point ) assertion `GDK_IS_DRAWABLE (drawable)' failed ? --------



hi all, thanx for ur reply, i found that 
gtk_drawing_area_new();  is returing a drawable, but 
that  " da->window "  is zero.is this the problem. or
usually will it be zero always.?
                  

--- iain <iain prettypeople org> wrote: > 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"
 

________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com



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