Email Button From Preview in Design mode
Any way to know the email button was clicked from the preview in design
mode. I try the code below which I found here. This only works in plain
preview mode and not in design preview.
uses
ppPrvDlg;
procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
begin
TppPrintPreview(ppReport1.PreviewForm).Toolbar.Items[1].OnClick :=
EmailOnClickEvent;
end;
mode. I try the code below which I found here. This only works in plain
preview mode and not in design preview.
uses
ppPrvDlg;
procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
begin
TppPrintPreview(ppReport1.PreviewForm).Toolbar.Items[1].OnClick :=
EmailOnClickEvent;
end;
This discussion has been closed.
Comments
For future reference, please use your full real name when posting to these
newsgroups instead of your initials.
Try using the OnTabChanged event to check if the preview is being viewed,
then access the email button using the
TppDesignWindow.PreviewManager.Previewer property...
procedure TForm1.ppDesigner1TabChanged(Sender: TObject);
var
lPreview: TppPreview;
begin
lPreview := TppPreview(ppDesigner1.Form.PreviewManager.Previewer);
if lPreview <> nil then
lPreview.EmailButton.OnClick := EmailClickEvent;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Why is so important we use our real name? If is to verify my registration I
can send you that on private email. I just do not want certain people
finding me or what I do by just doing a google search.