Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Window size

Status
Not open for further replies.

fhutt

Programmer
Jul 7, 2006
79
0
0
AU
I am running Windows XP and would like to use TCL/TK to find out the screen size in pixels - eg 1024x768.

Is there an easy way to do this?
fhutt
 
winfo screenheight window
Returns a decimal string giving the height of window's screen, in pixels.
winfo screenmmheight window
Returns a decimal string giving the height of window's screen, in millimeters.
winfo screenmmwidth window
Returns a decimal string giving the width of window's screen, in millimeters.
winfo screenvisual window
Returns one of the following strings to indicate the default visual class for window's screen: directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor.
winfo screenwidth window
Returns a decimal string giving the width of window's screen, in pixels.

_________________
Bob Rashkin
 
Bong, thank you very much.

winfo screenheight .
winfo screenwidth .

These are just what I was looking for.
fhutt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top