sashac88 has asked for the wisdom of the Perl Monks concerning the following question:

Hey,monks.
How can I define custom size for MainWindow?
For instance:
$mw=MainWindow->new;
How to specify that $mw should be different size than default?
Thanks in advance.

Replies are listed 'Best First'.
Re: define size to MainWindow (TK)
by Joost (Canon) on May 04, 2005 at 14:35 UTC
Re: define size to MainWindow (TK)
by thundergnat (Deacon) on May 04, 2005 at 15:42 UTC
    You can also set the size (and position) with the geometry method.
    my $mw = MainWindow->new; $mw->geometry('200x200+200+200');
    Where the geometry is a string consisting of width x height + X offset + Y offset. (Offsets of top left corner of window from 0,0 of the screen.)
Re: define size to MainWindow (TK)
by zentara (Cardinal) on May 04, 2005 at 18:11 UTC
    Additionally, if you want it so the user can't resize it:
    $mw->resizable(0,0);

    I'm not really a human, but I play one on earth. flash japh