Delphi programmers often ask how they can set a "repeated" (tiled)
background
image for a form. Do you suppose that this can be done by setting some
property
of the form
to the location of the image? This is perfectly understandable, since you
can do this
for an HTML page. This might be a handy addition to Delphi, but for the
moment you
still have to program this feature.
A quick example:
- Add an Image component to your form.
- Let its Picture property point to a graphic. Or load the
graphic during
runtime, as is done in our example.
- Each time the form is repainted, copy the Image's bitmap as many
times
as is necessary to fill the entire form.
There's an example project TILING.ZIP in our
Download section,
under the heading Tutorial Projects.
|
|