ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Controlling DoPreviews properties
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jrpcguru

USA
266 Posts

Posted - Jul 17 2015 :  21:04:17  Show Profile  Reply
Can you provide an example of how to control properties of DoPreviews such as the background color for the dialog and the images? Thanks.

J.R.

xequte

38616 Posts

Posted - Jul 20 2015 :  17:33:17  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: