[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk
Subject:    [gtk-list] Re: Can't refresh drawing area
From:       Havoc Pennington <rhp () zirx ! pair ! com>
Date:       1999-07-08 15:46:59
[Download RAW message or body]


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


-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic