Desynchronized size of a viewport



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...

Any help will be greatly appreciated !
Stephane.

PS: I must specify that my interface is built with Glade 0.6.4, but I
don't the problem comes from it.
-- 
                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]