TIP #262: Background Images for Frames

Title:Background Images for Frames
Version:$Revision: 1.5 $
Authors: Eric Taylor <et2 at rocketship1 dot com>
Donal K. Fellows <donal dot k dot fellows at manchester dot ac dot uk>
Created:Saturday, 18 March 2006
Keywords:Tk, option


This TIP proposes an option for frames that allows users to set the background of the window to be an image.


Just a there is an -image option for button widgets, this TIP suggests that a -backgroundimage option for frames be implemented. The image should be either an entire single image, or a smaller image that would be tiled, with a -tile option. Tiling would repeat, as needed, a smaller image to fit the visible area of the frame.

If the image was tiled, then it should be re-tiled as needed during a resize. The image would reside behind any other decoration or other widgets that resided in the frame. The image should be re-configurable to replace the image and/or remove it, as with a button image.

This TIP should allow some rather classy looking tcl/tk programs to be created with much ease.

Proposed Change

Two new options are proposed for frame widgets, to be manipulated using the normal configure and cget methods:


This document has been placed in the public domain.

Powered by Tcl[Index] [History] [Edit] [HTML Format] [Source Format] [LaTeX Format] [Text Format] [XML Format] [*roff Format (experimental)] [RTF Format (experimental)]

TIP AutoGenerator - written by Donal K. Fellows