Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Sizing a PerlTk app

by Llew_Llaw_Gyffes (Scribe)
on Feb 27, 2006 at 15:01 UTC ( [id://533033]=perlquestion: print w/replies, xml ) Need Help??

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

I have a PerlTk app which creates its initial window as follows:

#!/usr/bin/perl use strict; use Tk; use Tk::ROText; # ... snipped for brevity ... # main(); MainLoop(); quit(); sub main { $app = MainWindow->new(-height => 500, -width => 800); $app -> configure(-background => 'white'); $app -> title("Much To Do About Nothing"); $app -> formGrid(40,30);

Unfortunately, it does not honor the specified size, and I actually get a window around about 700x250 instead of 800x500.  Is this functionality broken?  Is there a way to make a PerlTk application honor the requested window size?

Replies are listed 'Best First'.
Re: Sizing a PerlTk app
by zentara (Archbishop) on Feb 27, 2006 at 17:32 UTC
    Passing -height and -width in on the new method, never worked as far as I know. You would think it should be that way, but no. Use a second command:
    $app->geometry("500x800+150+100")

    I'm not really a human, but I play one on earth. flash japh
      That does, indeed, work. So the documentation is in error in this regard, as the documentation is where I got that method from.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://533033]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-03-28 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found