http://www.purl.org/tcl/home/man/tcl8.5/TkCmd/winfo.htm
- winfo id window
Notice that the return value of [winfo id ...] is the id used by toplevel and wish in
Is it a bug, that the results of winfo id and xwininfo differ in the window id exactly by one ?No, it isn't, from the toplevel page:DKF notes that, "toplevels on UNIX/X are really a collection of several windows; the window you draw on (which is what winfo id will tell you), another window for a menubar (if you've installed one) and a third one to contain the other two. If you do xwininfo -tree you should be able to find out what's really going on."
toplevel ... -use $idand
wish ... -use $idHere's an example:
label .t1 -text Above label .t2 -text Below frame .holder -container 1 pack .t1 .holder .t2 exec wish other_application.tcl -use [winfo id .holder] &[Include an image here.]Incidental remark: when CL substitutes
exec tclkit tiny.tcl -use [winfo id .holder] &for that last line, while running on WinNT, with tiny.tcl having content
pack [.button -text "Push me" -command exit]everything comes up OK. When the button is pushed, "Dr. Watson" appears. Dismissing it eventually results in a whited-out frame "hole" in the embedding Wish. Is this an error in Tclkit 8.4a3?
Is it a bug, that the results of winfo id and xwininfo differ in the window id exactly by one ?No, it isn't, from the toplevel page:DKF notes that, "toplevels on UNIX/X are really a collection of several windows; the window you draw on (which is what winfo id will tell you), another window for a menubar (if you've installed one) and a third one to contain the other two. If you do xwininfo -tree you should be able to find out what's really going on."