Hi all,

  I've got some troubles to get a top level window shrinked 
programmatically (i.e. calling GTK+ functions).

First a bit of background: for reasons long to explain, I'm not using 
any of the GTK+ "layout containers" except for a GtkExpander; I position 
the controls and resize them "manually".
The GtkExpander is being used inside a dialog window which should behave 
in the same way as the GTK+ open/save file dialog: when the user hides 
the child of the GtkExpander, the dialog window should shrink, when it 
shows the child, the dialog window should enlarge.

I've connected the notify::expanded signal of GtkExpander and from there 
I get the new size of the GtkExpander widget, then, get a pointer to the 
dialog window containing it and then:

1) recalculate minimal size for the entire dialog
2) try to set it using gtk_window_set_geometry_hints & GDK_HINT_MIN_SIZE

my problem is: collapsed->expanded transitions work perfectly: no 
flicker and the dialog is resized to its new min size.
For expanded->collapsed transition, the dialog never shrinks.


I tried also to use gtk_widget_set_size_request() and/or 
gtk_window_set_default_size() but there's no way to shrink 
programmatically that dialog window... I can just shrink it manually 
using the mouse.

Any hint?

Thanks a lot,
Francesco Montorsi

Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to