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 to the left and right of the line in the image.

imageName add itemType [option value...]

Add a new item of the specified type to the end of the last line of the compound image. ItemType may be bitmap, image, space, or text. All item types support the following options:

-anchor anchorPos

How the item should be aligned on its line along the vertical axis.

-padx amount

Amount of padding to add to the left and right side of the item.

-pady amount

Amount of padding to add to the top and bottom side of the item.

Bitmap items support the following options:

-background color

Background color for the bitmap.

-bitmap bitmap

Bitmap to add to the compound image.

-foreground color

Foreground color for the bitmap.

Image items support the following option:

-image imageName

Name of an image to add to the compound image.

Space items reserve empty space in the image. Space items support the following options:

-height amount

Height of space to add to the compound image.

-width amount

Width of space to add to the compound image.

Text items support the following options:

-background color

Background color for the text.

-font font

Font to be used for the text.

-foreground color

Foreground color for the text.

-justify justify

How to justify multiple lines of text. Justify may be left, right, or center.

-text string

Text string to be added to the compound image.

-underline integer

Integer index of a character in the text that should be underlined.

-wraplength chars

Maximum line length in characters. If chars is less than or equal to 0, no wrapping is done.

imageName cget option

Return the current value of the configuration option Option for the compound image.

imageName configure [Option [value [option value...]

Query or modify the configuration options of the compound image in the same manner as the standard widget configure method.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset