Background Frames

Messages and labels are only hijacked when their background is identical to the stripes background.

To use a certain background colour for a limited area is sometimes good to have. This is the purpose of a background frame .

A background frame is created from windows of class »Frame«, who reside inside the dialog. The frame’s background colour is used to draw the rectangle. Then the frame is lowered underneath the stripes window.

A background frame must not contain any controls. Whenever a background frame is lowered, all its managed clients go with it. You may use these client windows nonetheless! But they must be hijacked from the stripes window –and thus have to be children of the striped dialog. See also Example 6.14, “Sibling Management”.

TkPath is required for background frames.

Additional Option Database Properties

gradient

»gradient« is the most important property controlling a background frame. »gradient« accepts a colour such as »red3«, #334455 or a TkPath gradient. Hence the properties name.

Predefined gradients can be used with TkPath 0.2.4 to 0.2.8, only.

opacity

»opacity« is only meaningful when »gradient« is a colour or the frame’s background colour is used.

Defines the opacity (non-transparency) of that frame. Its default value is set to »1.0« –opaque.

borderColor, borderOpacity

How the frame’s border will be drawn.

The windows »borderWidth« property is used to define the border width of the rectangle.

radius

Defines the rounded corners of the rectangle.

The default value for radius is set to 8 pixel.