Version 10 of wm iconphoto

Updated 2015-05-21 14:15:54 by MiHa

From the wm reference page: [L1 ]:

wm iconphoto window ?-default? image1 ?image2 ...?

Sets the titlebar icon for window, based on the named photo images.
If -default is specified, this is applied to all future created toplevels as well.

The data in the images is taken as a snapshot at the time of invocation. use a string as input If the images are later changed, this is not reflected to the titlebar icons.

Multiple images are accepted, to allow different images sizes (e.g., 16x16 and 32x32) to be provided.
The window manager may scale provided icons to an appropriate size.

  • On Windows, the images are packed into a Windows icon structure.
    This will override an ico specified to wm iconbitmap, and vice versa.
  • On X, the images are arranged into the _NET_WM_ICON X property, which most modern window managers support.
    A wm iconbitmap may exist simultaneously.
    It is recommended to use not more than 2 icons, placing the larger icon first.
  • On Macintosh, this currently does nothing.

MG 16 June 2006 - (Moved from wm) 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 [L2 ] 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.