Re: [gtk-list] Can't refresh drawing area




On Thu, 8 Jul 1999,     wrote:
> 
> I have a drawing area contained in a scroll window. I have a button
> that is supposed to change the drawing in the drawing area when it's
> pressed. Changing the drawing is not the problem, the problem is that
> I have to scroll or make the window bigger to see the changes in the
> drawing area. I thought of sending an expose event to the drawing
> area, but I haven't been able to. Any ideas?
> 

What does your code do? If it draws to area->window then it should work. 
If it draws to a pixmap you have to copy the pixmap onscreen.

> Also, I want try to change the size of the drawing area with
> "gtk_drawing_area_size", but it stays the same size, even after I've
> scrolled. Do I have to reinsert the drawing area into the scolling
> window?
> 

Some versions of Gtk 1.2 have a bug where gtk_widget_queue_resize() isn't
called when you call gtk_drawing_area_size(). Newer Gtk's fix this; for
compatibility, it won't hurt to call gtk_widget_queue_resize() manually
after you set the size.

Havoc




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