Tile Background Custom Control

The TTileBgnd Custom Control is a no-coding way to get high-speed, textured backgrounds.  It lets you use any size of image you like, and tiles the back of your form with it.  The author's implementation method is much faster at runtime than using the form's paint event.  Instantaneous on most machines!

The TTileBgnd Custom Control is extremely easy to use.  There are few properties to be concerned with at runtime.  Just follow these two steps:

1.  Drop a TTileBgnd control on your form.

2.  Doubleclick on the control to select a bitmap for the background.

There are a few sample backgrounds included in your installation directory with the BMP extension.  This control has not been tested with anything other than BMP.  If you don't wish to use the sample backgrounds, you can create your own.  There are many paint and photo-retouching programs that will do the job nicely.

For a bitmap to be a successful background, it has to be created so that when tiled, it looks like a complete image.

Coding Concerns

TClientMove Component

Border Width Properties

Border Color Properties


TClientMove Component

The TClientMove Component allows you to make forms movable by clicking anywhere in the client area of a form.  The only property to be concerned with at runtime is the Enabled property.  With the Enabled property True, it works.  With it False, it doesn't work.  The Enabled property can be turned on or off during runtime.


Coding Concerns

When you are using a tiled background control, all controls on your forms must have their own clipping regions.  Otherwise they won't show.  Since the TLabel control doesn't, any TLabel controls you use must be on a clipped control such as the TPanel control.  The TImage control must be placed on a TPanel as well.

To turn off tiling, change the Enabled property from True to False.  To turn it back on, change the Enabled property from False to True.  After turning tiling on or off, it's wise to call the RefreshTile event.

TtileBackground Custom Control


Border Width Properties

TTileBgnd's Border Width properties:  BInnermostWidth, BInnerWidth, BOuterWidth specify the width for three separate custom border properties.  The number can be 0 to 5.  If zero is specified, the specified border is not drawn.  If five is specified the border is quite wide.

Each property is detailed below:

InnermostWidth : InnermostWidth is the border closest to the center of the form.

InnerWidth:  InnerWidth is the border in the middle; the second border whichever direction you count from.

OuterWidth:  OuterWidth is the border on the very outside.

All of these borders can be different colors (you can actually specify a maximum of six colors between the three borders, at any one time).

See Also:

Border Color Properties


Border Color Properties

LowCornerOuterColor:	TColor.  This is the color of the section of outer border on the right side and bottom.  This can be set at design time by double-clicking on the property.  At run-time it can be set by assigning the value of a TColor variable to it.

LowCornerInnerColor:	TColor.  This is the color of the section of inner border on the right side and bottom.  This can be set at design time by double-clicking on the property.  At run-time it can be set by assigning the value of a TColor variable to it.

LowCornerInnermostColor:  TColor.  This is the color of the section of innermost border on the right side and bottom.  This can be set at design time by double-clicking on the property.  At run-time it can be set by assigning the value of a TColor variable to it.

HighCornerOuterColor:	TColor.  This is the color of the section of outer border on the left side and top.  This can be set at design time by double-clicking on the property.  At run-time it can be set by assigning the value of a TColor variable to it.

HighCornerInnerColor:	TColor.  This is the color of the section of inner border on the left side and top.  This can be set at design time by double-clicking on the property.  At run-time it can be set by assigning the value of a TColor variable to it.

HighCornerInnermostColor:  TColor.  This is the color of the section of innermost border on the left side and top.  This can be set at design time by double-clicking on the property.  At run-time it can be set by assigning the value of a TColor variable to it.