Search code examples
tcltk-toolkitwindow-managers

What is the difference between these winfo commands? (Tcl/Tk)


What is the difference between the

winfo height *window*
winfo width *window*

commands and the

winfo screenheight *window*
winfo screenwidth *window*

commands?

Having read the documentation here: Tk Built-In Commands , it seems to me like there is no difference in their return values. If so, what is the reason for the existence of these seemingly identical commands, historically?


Solution

  • This is easy to test:

    strobel@suse131-intel:~> wish
    % winfo height .
    200
    % winfo screenheight .       
    1200
    

    So one is window, one is screen.

    P.S. you should not answer in a comment, the question can't be marked answered.