Re: Getting window size (correctly)
- From: eichin-gtk-perl thok org
- To: bcorr <bcorr micron com>
- Cc: "'gtk-perl-list gnome org'" <gtk-perl-list gnome org>
- Subject: Re: Getting window size (correctly)
- Date: 10 May 2002 11:38:10 -0400
geometry is a *requested* size -- you want an allocation, which is the
resulting size.
You probably *also* want to run this after an expose_event -- when the
app first starts up it isn't going to have a real allocation yet, and
the allocations all (well mostly) change on a window resize...
To avoid the mysterious [2,3], I now use:
my ($alloc_x, $alloc_y, $alloc_w, $alloc_h) = @{$w->allocation};
though you can be less verbose about it in context.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]