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. 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.
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 TIP #159: Extending Tk 'wm' Command to Support Coloured Icons 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.