Hi JR
// Customizing the Preview dialog of a TImageEnView
uses
Previews;
procedure TMyForm.FormCreate(Sender: TObject);
begin
ImageEnView1.Proc.OnPreview := ProcPreview;
end;
procedure TMyForm.ProcPreview(Sender: TObject; PreviewForm: TForm);
begin
with TfPreviews(PreviewForm) do
begin
// Red dialog
Color := clRed;
// Caption of OK button
OkButton.Caption := 'Yeah baby';
// Replace custom button
CancelButton.Visible := False;
With TBitBtn.Create( PreviewForm ) do
begin
Parent := PreviewForm;
Left := CancelButton.Left;
Top := CancelButton.Top + CancelButton.Height + 8;
Width := CancelButton.Width;
Height := CancelButton.Height;
Anchors := [akTop, akRight];
Caption := 'My Cancel';
ModalResult := 2;
end;
end;
end;
Nigel
Xequte Software
www.xequte.com
nigel@xequte.com