ImageEn, unit iemview

TIECheckboxClickEvent

TIECheckboxClickEvent

Declaration

type TIECheckboxClickEvent = procedure(Sender: TObject; Index: Integer; var IsChecked: Boolean) of object;

Description

Occurs whenever a user clicks a checkbox.

Index is the index of the clicked image.
IsChecked specifies the new status of the image. You can override it, e.g. set it to False if the image cannot be checked.

Note: Don't read CheckedCount in this event which will not yet be valid. Use OnClick or OnMouseUp.

Example

procedure TForm1.ImageEnMView1CheckboxClick(Sender: TObject; Index: Integer; var IsChecked: Boolean);
begin
  // Only allow JPEG images to be checked
  if IsChecked and (IEFileIsOfFormat(ImageEnMView1.ImageFilename[Index], ioJPEG) = False) then
  begin
    MessageBeep(MB_ICONEXCLAMATION);
    IsChecked := False;
  end;
end;

See Also

Checkboxes
CheckedCount