Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start Tk-application with window maximized

Status
Not open for further replies.

hungryhungryhippo

Programmer
Oct 23, 2007
26
DE
Hi,
can anyone tell me how to create a Toplevel (MainWindow->new) that is maximized? I'm using Linux, so the $mw->state('zoomed'); thingie does not work :(
thanks,
michael
 
After looking on perlmonks and in the PerlFAQ, i came up with this to force the geometry (works for windowsXP)

Code:
#!/usr/bin/perl
use Tk;
my $m=new MainWindow();
my $h=$m->screenheight();
my $w=$m->screenwidth();
$m->geometry($w."x$h+0+0" );
MainLoop;

Heh, fits in a twitter post even.

Kordaff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top