ImageEn, unit iemview

TIEButtonClickEvent


Declaration

type TIEButtonClickEvent = procedure(Sender: TObject; ThumbIndex, ButtonIndex: integer) of object;


Description

Occurs whenever a thumbnail button is clicked by the user.

ThumbIndex is the index of the image being drawn (i.e. 0 for first image in the grid, 1 for second, etc.)
ButtonIndex is the index of the button being drawn (0 for the left-most button, etc).


Example

procedure TMainForm.ThumbButtonClick(Sender: TObject; ThumbIndex, ButtonIndex: Integer);
begin
  if not ThumbButtonEnabled( ButtonIndex ) then
    exit;

  if ButtonIndex = 0 then
    ShowPreview( ThumbIndex )
  else
  if ButtonIndex = 1  then
    FixColor( ThumbIndex )
  else
  if ButtonIndex = 2  then
    SaveImage( ThumbIndex );
end;