Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Perl Tk : Displaying window in bottom right Corner

by pavunkumar (Scribe)
on Apr 02, 2010 at 11:34 UTC ( #832468=perlquestion: print w/ replies, xml ) Need Help??
pavunkumar has asked for the wisdom of the Perl Monks concerning the following question:

I have planned to do the chatting the exercise Perl socket. In this I want to display the require window using Perl Tk . Here my requirement is that the window has to display in the bottom right corner . It is like Gmail Chat window. What I need to for achieve this thing. By default it displays in top left corner.

Thanks in Advance

Comment on Perl Tk : Displaying window in bottom right Corner
Re: Perl Tk : Displaying window in bottom right Corner
by lamprecht (Friar) on Apr 02, 2010 at 12:09 UTC
    Hi,

    You can use the screenwidth and screenheight methods to get information about the screens geometry. Then use the geometry() method to place your main window.

    see Tk::Widget for documentation.

    Cheers, Christoph
      Use the following code
      use strict; use warnings; use Tk; # Main Window my $mw = MainWindow->new; $mw->geometry('+793+475'); MainLoop;

        On my screen, (1920x1080) your code will put a window almost on the center :)

        Update: I guess your screen resolution is 1024x768 (or 1024x800).

        Regards, Stefan

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2014-10-23 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (129 votes), past polls