Updated 2015-05-22 02:07:40 by RLE

Return window related information.

See wm for Window manager related information.

Common subcommands edit

Rarely-used subcommands edit

You probably don't need to use these subcommands, either because they couple to functionality that is largely obsolete in the days of universal full-depth displays or because they require deep knowledge of the X protocol to make use of.

  • [winfo atom] ?-displayof window? name
  • [winfo atomname] ?-displayof window? id
  • [winfo cells] window
  • [winfo colormapfull] window
  • [winfo depth] window
  • winfo id window
  • winfo interps ?-displayof window?
  • [winfo pathname] ?-displayof window? id
  • [winfo screen] window
  • [winfo screencells] window
  • [winfo screendepth] window
  • [winfo screenvisual] window
  • [winfo visual] window
  • [winfo visualid] window
  • [winfo visualsavailable] window ?includeids?

RS 2006-04-12: winfo class returns for toplevels the app name (as from the topmost script), else the Titlecased widget type. Here's a little convenience proc that returns the suitable Tk command for deserializing a widget:
 proc winfo'class w {
   if {[winfo toplevel $w] eq $w} {return toplevel}
   string tolower [winfo class $w]

MG This seems to only be the case for ".", other toplevels seem to return "Toplevel" as you'd expect. (Anyone know why it returns the app name for ., though? Curious what the thought behind it was.)

DKF: It relates to option database support. In particular, other names would be used by completely different applications (e.g. Firefox, Xterm, etc.)

MG Ahh, I see. Thanks :)