Re: Forcing size_allocate?
- From: The Surprises <thesurprises1 attbi com>
- To: gtk-list gnome org
- Subject: Re: Forcing size_allocate?
- Date: Wed, 9 Oct 2002 11:07:18 -0700
Fair enough.. I tried registering the expose event for the
gnome_canvas_item's to their draw routines and removed the
size_allocate event. I cannot get this to work. The graphics do not
show up at all now. This is probably because I can't do an initial draw
until an expose event, so there's nothing on the screen to 'expose'.
Can you offer a suggestion on how I would get around this?
On Tue, Oct 08, 2002 at 07:59:57PM -0400, Paul Davis wrote:
> >I have a gnome_canvas packed into a vbox. All drawing in the canvas is
> >connected to a size_allocate event because I need to know the width and
> >height of the area before drawing.
> don't do this. a size allocate will always be followed by an expose
> event. all drawing must be done from the expose event handler, always.
> just store the width and height in the size allocate handler for later
> use. if for some reason, the expose event is really missing, use
> gtk_widget_queue_draw() to cause one to occur "soon".
] [Thread Prev