Re: this is interesting, when "running" eval



-----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;
- -- 
GnuPG public key available from
http://homepage.mac.com/danflemming/gnupg_key.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBK2Y9ER493M5r4PIRAnysAKCNtgDEOvPq4ig8atTsvCn/sEDUoQCgiR0v
UD8NRsI36isJhewrmhL923M=
=zVWb
-----END PGP SIGNATURE-----



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