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:
Common subcommands edit
- wm aspect window ?minNumer minDenom maxNumer maxDenom?
— enforce aspect ratios when resizing a window - wm attributes - set/return platform-specific window attributes
- wm deiconify - makes a window that was iconified or withdrawn show itself upon the screen (at the next idle moment).
- wm forget
- wm geometry
- wm group
- wm iconbitmap window -default ?image?
— Note that only the form with the -default option is at all relevant to modern code. - wm iconify - makes a window stop showing itself and instead switch to its iconic form.
- wm iconname
- wm iconphoto
- wm manage
- wm maxsize
- wm minsize
- wm overrideredirect
- wm protocol
- wm resizable
- wm stackorder - return a list of toplevel windows in stacking order
- wm state
- wm title - set or query the title of a toplevel window
- wm transient - inform window manager that window is transient for another window
- wm withdraw - make the window completely invisible, not even an icon. Also makes the window manager forget about the window.
Rare subcommands edit
- wm client
- wm colormapwindows
- wm command
- wm focusmodel
- wm frame
- wm grid
- wm iconbitmap
- [wm iconmask]
- [wm iconposition]
- wm iconwindow
- [wm positionfrom]
- [wm sizefrom]
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.
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.