Finding Screen Size to centre top-level window on Screen 
Author Message
 Finding Screen Size to centre top-level window on Screen

I wish to centre the main window on the screen in MS Windows 9x, but cannot
find the command to report the screen dimensions.  I am able to position the
main window using "wm geometry +....." but in order to determine the offset
from the top left corner, I need to know the dimensions of the bottom right
corner.

Regards
Victor Hellberg



Sat, 29 Dec 2001 03:00:00 GMT  
 Finding Screen Size to centre top-level window on Screen
Victor,

have a look at the commands
    winfo screenheight <window>
    winfo screenwidth <window>
in your online-help.

Hope it helps.

Best regards,
Volker

Volker Rautenberg



Quote:
> I wish to centre the main window on the screen in MS Windows 9x, but
cannot
> find the command to report the screen dimensions.  I am able to
position the
> main window using "wm geometry +....." but in order to determine the
offset
> from the top left corner, I need to know the dimensions of the bottom
right
> corner.

> Regards
> Victor Hellberg




Sat, 29 Dec 2001 03:00:00 GMT  
 Finding Screen Size to centre top-level window on Screen

Quote:

> I wish to centre the main window on the screen in MS Windows 9x, but cannot
> find the command to report the screen dimensions.  I am able to position the
> main window using "wm geometry +....." but in order to determine the offset
> from the top left corner, I need to know the dimensions of the bottom right
> corner.

try

set h [winfo screenheight .]
set w [winfo screenwidth .]

L

--
Penguin Power!           Nothing I say reflects the views of my employer


CGI - FWFM Project                                 Phone: (514) 391-9523



Sat, 29 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to set screen size of Labview toplevel application

2. Changing the centre of the screen.

3. setting start size of top level window

4. Size of not yet mapped top-level window?

5. Minimum size for top level window...

6. Character size on the screen Windows NT 4.0

7. Strange screen size with Windows XP

8. Screen size in window formatter

9. Fitting window dialogs under various desktop screen size

10. windows and screen sizes

11. ?Folling bios (dos) for screen saver (screen related)??

12. top level font size

 

 
Powered by phpBB® Forum Software