beetlebug▾
/

wm iconphoto

Sets the icon of a toplevel from photo images.

wm iconphoto WINDOW ?-default? IMAGE ?IMAGE ...?

Description

Each IMAGE is a photo of image create photo, such as the icon at several sizes. The pixels go to the backend at the call, so a later change of a photo does not change the icon. -default also gives the photos to the backend as the default icon of the application. With no IMAGE, ztk gives the images of the last call.

Returns

An empty string, or a list of images.

Examples

% toplevel .t
> image create photo ic -width 16 -height 16
> wm iconphoto .t ic
> wm iconphoto .t
ic

Errors

% wm iconphoto .t noimage
can't use "noimage" as iconphoto: not a photo image
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1