Version 36 of wm

Updated 2011-04-11 07:32:54 by MGS

wm - Communicate with the window manager about attributes of toplevel windows.
http://purl.org/tcl/home/man/tcl/TkCmd/wm.htm holds the standard documentation.

Also, "wm" commonly abbreviates "window manager", a distinct concept.


The supported subcommands of wm are:

Please add notes on how you make use of the commands below in useful, and perhaps unique, ways.


Could someone address monochrome vs multicolor icons and how to use the appropriate wm command to achieve the difference?

See how do I give my application a color icon for some information.


Can someone point me either to an existing page, or at least write something here, about the most cross platform approach to dealing with window geometry? That is to say, the ability to create a window at a specific location, determine whether a user has later moved it, and save off that info so that next time around, the process begins appropriated (the window, at startup, appears where the user last moved it...) RS: wm geometry returns (or sets) geometry from a WxH+X+Y string. You could save that to an rc file before exit, and apply it from the rc file if it exists.


lv 2003Aug29 does Tk's wm command have the ability to report what size of color map a window has - whether it potentially has a color palette of 8 , 16, 24, or 32 (or larger?) and what colors are currently in use in the color map?

MGS [2003/09/15] - You will probably find more answers from winfo, such as winfo depth, winfo colormapfull, winfo cells, winfo visual.


MG 16 June 2006 - For lack of a better place to put this.. I just tried out the [wm iconphoto] command (in Tclkit 8.5a4 on Windows XP) after reading the TIP on it, and it doesn't seem to work quite right there. The graphic I used showed up OK, but the colours were slightly off (it was a black/red graphic, which showed up as black/blue). The image was definitely OK and loaded correctly; I did

  set im [image create photo -file test.gif]
  wm iconphoto . -default $im
  pack [label .foo -image $im]

and the label showed correctly, while the icon did not. Not sure if this is a known issue (the TIP in question [L1 ] is marked Done) or if Win support just isn't finalised yet; anyone have more info, or know where a more appropriate place to report this would be? Thanks.