Name

image

image create compound imageName [option value...]

The compound image type allows a single image to be composed of multiple lines, each of which contains one or more text items, bitmaps, or other images. Available options are as follows:

-background color

Background color for the image and for bitmap items in the image.

-borderwidth amount

Width of 3D border drawn around the image.

-font font

Default font for text items in the image.

-foreground color

Foreground color for the bitmap and text items in the image.

-padx amount

Extra space to request for padding on the left and right side of the image.

-pady amount

Extra space to request for padding on the top and bottom side of the image.

-relief relief

3D effect for the border around the image.

-showbackground boolean

Whether the background and 3D border should be drawn or the image should have a transparent background. The default is false.

-window pathName

Window in which the compound image is to be drawn. When the window is destroyed, the image is also destroyed. This option must be specified when a compound image is created and cannot be changed.

When a compound image is created, a Tcl command with the same name as the image is created. This command supports the following operations:

imageName add line [-anchor anchorPos] [-padx amount]

Create a new line for items at the bottom of the image. If anchorPos is specified, it specifies how the line should be aligned horizontally. If amount is specified, it specifies the amount of padding to add ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.