image

Name

image -- A widget which shows an image.

Synopsis

image [-option value...]

Screenshot

Options

-image

type: percent-string (default: "")

Image to be shown, can be either a file (prefix "%/") or a stock item (prefix "%#").

-stockSize

type: ONEOF menu smallToolBar largeToolBar button dnd dialog (default: button)

Size of the image. This option is only valid for a stock image.

-align

type: a list of the horizontal and vertical alignment or one of topLeft, top, topRight, left, center, right, bottomLeft, bottom, or bottomRight

Alignment of the image.

-xPad

type: integer (default: 0)

Horizontal padding.

-yPad

type: integer (default: 0)

Vertical padding.

-size

type: integer or list-of-two-integer

Width and height in pixel. If only one value is given, both sizes are the same. The original image is not remembered, that means that if for example an image is first scaled by 0.5 (half size) and then scaled by 2 (double size) it does not look like the original one, since by decreasing its size information is lost which cannot be recovered. This option is only valid for pixbuf images, i.e. not animated images from file.

-visible

type: boolean (default: 1)

Whether or not the item is visible.

-sensitive

type: boolean (default: 1)

Whether or not the item is sensitve to user input.

-name

type: string

Name of the widget, can be used to set options in an rc file.

Description

An image widget shows an image. Different formats and animation are supported.

Commands

id delete

Deletes the widget and the associated tcl command.

id configure [-option value...]

Configures the widget. Option may have any of the values accepted on creation of the widget.

Example

set img [gnocl::image -image "%#SaveAs" -stockSize dialog]
gnocl::window -title "Image" -child $img

results in

See also

GtkImage