Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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

Replies are listed 'Best First'.
Re: Perl Tk : Displaying window in bottom right Corner
by lamprecht (Friar) on Apr 02, 2010 at 12:09 UTC

    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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://832468]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2018-04-26 18:17 GMT
Find Nodes?
    Voting Booth?