image configure
A command of a photo or a bitmap: gives or sets the options of the image.
IMAGENAME configure ?OPTION? ?VALUE OPTION VALUE ...?
Description
With one OPTION, gives its entry: the option, two empty strings, the default, and the value. With pairs of options and values, sets them, and a widget that shows the image draws again. With no option, a bitmap gives an entry for each option.
Returns
An entry, a list of entries, or an empty string.
Examples
% image create photo cf
> cf configure -width 5 -height 2
> list [image width cf] [cf configure -width]
5 {-width {} {} {} 5}
% image create bitmap cfb -foreground red
> llength [cfb configure]
6
Errors
% image create photo cf2; cf2 configure -size 1
bad option "-size": must be -data, -density, -file, -format, -gamma, -height, -palette, or -width
-errorcode NONE
Differences from Tcl
- A photo with no option gives an empty string. Tk 8.6.16 gives an entry for each option.
- The entry of a photo has an empty default, such as
{-width {} {} {} 5}. Tk 8.6.16 gives{-width {} {} 0 5}. - A bitmap with one OPTION gives the error
value for "-foreground" missing. Tk 8.6.16 gives the entry of the option.
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1