_________________________________________________________________
image - Define an element based on an image
style create element name image imageName ?options? _________________________________________________________________
The image element factory creates a new element in the current theme whose visual appearance is determined by a Tk image.
Valid options are:
If the element's allocated parcel is larger than the image, the image will be placed in the parcel based on the -sticky option. If the image needs to stretch horizon- tally (i.e., -sticky ew) or vertically (-sticky ns), sub- regions of the image are replicated to fill the parcel based on the -border option. The -border divides the image into 9 regions: four fixed corners, top and left edges (which may be tiled horizontally), left and right edges (which may be tiled vertically), and the central area (which may be tiled in both directions).
set button(normal) [image create photo -file button.png] set button(pressed) [image create photo -file button-pressed.png] style element create Button.button image $button(normal) \ -border {2 4} -map [list pressed $button(pressed) ] -sticky nswe
pixmap theme, image