On Tue, Aug 24, 2004 at 12:00:41 -0400, Daniel Flemming wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tue, 24 Aug 2004, [gb2312] Lich Lee wrote:
>
> > when I eval $text;
> > $text is " $window->set_size_request(x, y);"
> > if x and y are bigger than the original size of
> > $window, It can execute normally, but if they are
> > smaller, It seem never be executed,
>
> Nope, it's executing both times, it just doesn't do what you think it
> does.
>
> $widget->set_size_request (x,y) says to gtk+:
>
> Please would you make my widget at least x pixels wide and y pixels high?
>
> If widget is already x (or more) pixels wide and/or y (or more) pixels
> high, gtk+ thinks to itself, "Oh. The program already has enough space. I
> don't need to do anything." :)
>
> There is no $widget->set_maximum_size (x,y) in gtk+.
>
> If you want to remake a window so that it's as small as possible, this is
> how I do it.
>
> Remove the top-level widget from it first. (i.e. its HBox or VBox)
> $window->show_all;
> $window->set_size_request (0,0);
> Re-add the top-level box back.
> $window->show_all;
There is a LOT simpler way! If you
$window->set(allow_grow => 0);
Than the window *WILL* shrink to exactly it's size request!!
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <bulb@xxxxxx>
signature.asc
Description: Digital signature
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
|