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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Controlling DoPreviews properties

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jrpcguru Posted - Jul 17 2015 : 21:04:17
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.
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 20 2015 : 17:33:17
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