drawing area and expose event



  Hi All
  I have a gtk drawing area  put in a window.
  I have a function to draw something on  this drawing area [ using GdkRGB
  gdk_draw_rgb_image (darea,..) call ]

  Now I find if I directly call this funtion to draw on to the drawing area I
  get warnings such as :

  GLib-GObject-WARNING **: invalid cast from (NULL) pointer to `GdkDrawable'
  Gdk-CRITICAL **: file gdkdraw.c: line 244: assertion `GDK_IS_DRAWABLE (drawable)' failed


  Then I  attached an "expose-event"  to the drawing area and in the callback I put the same
  function(drawing fuction) and  it draws properly .

  Do we always need to attach the expose event to the drawing area to draw anything on it .
  Is there any other way where I can force the drawing .


 Thanks,
 Satyajit









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