TImageEnMView.SetCheckboxParams
Declaration
procedure SetCheckboxParams(iHorzMargin, iVertMargin : Integer; CustomCheckedImage : TBitmap = nil; CustomUncheckedImage : TBitmap = nil);
Description
Specifies the position and style of checkboxes (if
Checkboxes have been enabled).
Parameter | Description |
iHorzMargin | The position from the left (iecpTopLeft, iecpBottomLeft or iecpCenterLeft) or right (iecpTopRight, iecpBottomRight or iecpCenterRight) of the thumbnail where the checkbox is positioned. Default: 4 |
iVertMargin | The position from the top (iecpTopLeft or iecpTopRight) or bottom (iecpBottomLeft or iecpBottomRight) of the thumbnail where the checkbox is positioned. Default: 4 |
CustomCheckedImage | If specified, it is the image that will be shown as the "checked" box. If nil the Windows standard checkbox image is used |
CustomUncheckedImage | If specified, it is the image that will be shown as the "unchecked" box. If nil the Windows standard checkbox image is used |
See Also
◼CheckboxPos
// Load custom checkbox images from file and position them at the very top left
CheckBmp := TBitmap.create;
UncheckBmp := TBitmap.create;
try
CheckBmp.LoadFromFile('C:\Images\Checked.bmp');
UncheckBmp.LoadFromFile('C:\Images\Unchecked.bmp');
ImageEnMView1.SetCheckboxParams(0, 0, CheckBmp, UncheckBmp);
ImageEnMView1.CheckboxPos := iecpTopLeft;
ImageEnMView1.Checkboxes := iecbAlways;
finally
CheckBmp.free;
UncheckBmp.free;
end;