Declaration
property Wallpaper: TPicture;
Description
Sets a background image that appears behind the image/thumbnails.
Use
WallpaperStyle to specify how the wallpaper is painted.
Note:
◼In
TImageEnView, you will only see the background if the image (layer 0) is smaller than the control. If an image has not yet been loaded then the image will be the same size as the control, so to see the background reduce the size of the image, e.g. ImageEnView1.IEBitmap.Allocate( 1, 1 );
◼To load and store a wallpaper image at runtime you need to use a format that is supported by the VCL (and have the approriate unit listed in your uses clause). You are better to assign the wallpaper at runtime, as shown in the first example below.
Default: *Unspecified*
| Demos\Multi\Thumbnails2\Thumbnails2.dpr |
// Tile a bitmap over the TImageEnMView background (behind thumbnails)
// Wallpaper is a TPicture (which does not always support JPEG) so load into a TIEBitmap and then assign the bitmap
bmp := TIEBitmap.Create( ExtractFilePath( Application.Exename ) + 'Wallpaper.jpg');
ImageEnMView1.WallpaperStyle := iewoTile;
ImageEnMView1.Wallpaper.Assign( bmp.VclBitmap );
bmp.free;
// Use an image as the full background of a TImageEnView (behind the main image and layers)
bmp := TIEBitmap.Create( ExtractFilePath( Application.Exename ) + 'Wallpaper.jpg');
ImageEnView1.WallpaperStyle := iewoStretch;
ImageEnView1.Wallpaper.Assign( bmp.VclBitmap );
bmp.free;
// If the wallpaper file is BMP format, you can just use:
// Tile a bitmap over the TImageEnView background
ImageEnView1.WallpaperStyle := iewoStretch;
ImageEnView1.Wallpaper.LoadFromFile('D:\MyWallpaper.bmp');
// Clear the wallpaper
ImageEnView1.Wallpaper := nil;