Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

TK - Best MainWindow management tips

by crabbdean (Pilgrim)
on Mar 26, 2004 at 06:39 UTC ( #339955=perlquestion: print w/ replies, xml ) Need Help??
crabbdean has asked for the wisdom of the Perl Monks concerning the following question:

Hi Fellow Monks,

There are some standard things in Tk that I'm interested to know how others do them.

Best way for:
1. Maximising your MainWindow so that it fills the screen.
2. Minimising your MainWindow.
3. Finding out your screen size (not your widget window size).
4. A cancel button that kills the MainWindow and any currently running processes gracefully.

If you have any other great tid-bits for what you'd consider good MainWindow Management that you've found useful and want to share, please do so. :-)

Dean
The Funkster of Mirth
Programming these days takes more than a lone avenger with a compiler. - sam
RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers

Comment on TK - Best MainWindow management tips
Re: TK - Best MainWindow management tips
by PodMaster (Abbot) on Mar 26, 2004 at 07:29 UTC
Re: TK - Best MainWindow management tips
by crabbdean (Pilgrim) on Mar 26, 2004 at 09:58 UTC
    Well this beautiful piece of code answers questions 1,2 and 3 --> Re: Maximise or minimise Perl/Tk Main Window I doubt you'll get better than that!

    Update: You'll actually see running this a small problem (on Win32 systems), the window maximises to even go underneath your application tray at the bottom of the screen so that the bottom of your MainWindow is hidden. I'll work on a solution and post it. Anyone?
    Answer:Okay answer is here I posted it further down this thread, SORRY! I should have put it here.

    I'm most curious about point 4. I'll have to research that some more and write back.

    Actually I'd be interested also in how to centre a MainWindow on your screen. Anyone?

    Update: Okay here is a nice solution to centering your window --> Center a Tk window on the screen The second solution given on this page works best

    This is also a good article on Windows Window Management Win32 Window Hierarchy and Styles

    Dean
    The Funkster of Mirth
    Programming these days takes more than a lone avenger with a compiler. - sam
    RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers
        Thanks! Although, on "make test" I get this error.

        Makefile:644: *** missing separator. Stop.

        Not being familiar with this install process I'm at a loss here. Any pointers? ... or else I'll have to research how to solve this problem. I'll also look more into the Win32::API. Thanks


        Dean
        The Funkster of Mirth
        Programming these days takes more than a lone avenger with a compiler. - sam
        RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers
      Howdy!

      perhaps worse yet, for my, it may well cram the title bar against the top of the screen, under my task bar (which is where god intended it to be).

      That misconduct, seen in Microsloth Excel, on my Win2K box, makes it real interesting to get to the minimize and close buttons...

      yours,
      Michael

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-09-03 04:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls