TImageList( unit KOL.pas ) ï TObj ï _TObj
TImageList = object( TObj )
ImageList incapsulation.
property Handle: THandle;
Handle of ImageList object.
property ShareImages: Boolean;
True if images are shared between processes (it is set to True,
if its Handle is assigned to given value, which is a handle of
already existing ImageList object).
property Colors: TImageListColors;
Colors used to represent images.
property Masked: Boolean;
True, if mask is used. It is set to True, if first added image
is icon, e.g.
property ImgWidth: Integer;
Width of every image in list. If change, ImageList is cleared.
property ImgHeight: Integer;
Height of every image in list. If change, ImageList is cleared.
property Count: Integer;
Ñ
Number of images in list.
property AllocBy: Integer;
Allocation factor. Default is 1. Set it to size of ImageList if this
value is known - to optimize speed of allocation.
property BkColor: TColor;
Background color.
property BlendColor: TColor;
Blend color.
property Bitmap: HBitmap;
Ñ
Bitmap, containing all ImageList images (tiled horizontally).
property Mask: HBitmap;
Ñ
Monochrome bitmap, containing masks for all images in list (if not
Masked, always returns nil).
property DrawingStyle: TDrawingStyle;
Drawing style.
property Overlay[ Idx: TImgLOVrlayIdx ]: Integer;
Overlay images for image list (images, used as overlay images to draw over
other images from the image list). These overalay images can be used in
listview and treeview as overlaying images (up to four masks at the same
time).
procedure SetHandle( const Value: THandle );
N
destructor Destroy; virtual;
function ImgRect( Idx: Integer ): TRect;
Rectangle occupied of given image in ImageList.
function Add( Bmp, Msk: HBitmap ): Integer;
Adds bitmap and given mask to ImageList.
function AddMasked( Bmp: HBitmap; Color: TColor ): Integer;
Adds bitmap to ImageList, using given color to create mask.
function AddIcon( Ico: HIcon ): Integer;
Adds icon to ImageList (always masked).
procedure Delete( Idx: Integer );
Deletes given image from ImageList.
procedure Clear;
Makes ImageList empty.
function Replace( Idx: Integer; Bmp, Msk: HBitmap ): Boolean;
Replaces given (by index) image with bitmap and its mask with mask bitmap.
function ReplaceIcon( Idx: Integer; Ico: HIcon ): Boolean;
Replaces given (by index) image with an icon.
function Merge( Idx: Integer; ImgList2: PImageList; Idx2: Integer; X, Y: Integer ): PImageList;
Merges two ImageList objects, returns resulting ImageList.
function ExtractIcon( Idx: Integer ): HIcon;
Extracts icon by index.
function ExtractIconEx( Idx: Integer ): HIcon;
Extracts icon (is created using current drawing style).
procedure Draw( Idx: Integer; DC: HDC; X, Y: Integer );
Draws given (by index) image from ImageList onto passed Device Context.
procedure StretchDraw( Idx: Integer; DC: HDC; const Rect: TRect );
Draws given image with stratching.
function LoadBitmap( ResourceName: PKOLChar; TranspColor: TColor ): Boolean;
Loads ImageList from resource.
function LoadFromFile( FileName: PKOLChar; TranspColor: TColor; ImgType: TImageType ): Boolean;
Loads ImageList from file.
function LoadSystemIcons( SmallIcons: Boolean ): Boolean;
Assigns ImageList to system icons list (big or small).
[ Index ]
This help is generated 14-Jun-2010 by KOL Help generator, (C) 2000-2001 by Vladimir Kladov
Modified (C) 2003 by Alexander Bartov