Re: Desynchronized size of a viewport



On Tue, 18 Mar 2003 15:31:30 +0100
Stéphane Albin <stephane albin emse fr> wrote:

Hi,

With gtk-1.2,
I have a GtkHPaned with a GtkViewport on the left itself with a
GtkDrawingArea inside.
I can change the size of the viewport with the mouse and, in a
callback for the 'size-request' signal, I get the size with :

  adj = gtk_viewport_get_hadjustment(GTK_VIEWPORT(widget));
  width = adj->page_size;

or :

  width = widget->allocation.width

which gives the same value.
But, unfortunately, this value is not synchronized.
Instead of getting the new size, I get the preceding one.
Of course, it's not very helpfull to update the size of my drawing
area...

It seems that the right signal is 'size-allocate'.
Anyway, it works fine now.
-- 
                Stéphane ALBIN
Laboratoire d'Images de Synthèse de St-Etienne
Centre SIMMO - Ecole des Mines de Saint-Etienne
Tel: (33) 4 77 42 01 78 - Fax:  (33) 4 77 42 66 66
e-mail: Stephane Albin emse fr - www: http://perso.wanadoo.fr/salbin/



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