How to access the print button in the preview
Hello,
I'm migrating from RB 6.03 to 10.07.
I want to modify the print button in the preview.
In 6.03, I used a custom preview class, in the constructor I got the
Toolbar, and one of the components (a TSpeedButton) was the print button.
In 10.07, the components of the ppPreview are
- a TppTBRootItem
- a TppTBXChevronItem
- a TppTBXToolbarView
How can I access with one of these components the print button?
Thanks in advance
Klaus
I'm migrating from RB 6.03 to 10.07.
I want to modify the print button in the preview.
In 6.03, I used a custom preview class, in the constructor I got the
Toolbar, and one of the components (a TSpeedButton) was the print button.
In 10.07, the components of the ppPreview are
- a TppTBRootItem
- a TppTBXChevronItem
- a TppTBXToolbarView
How can I access with one of these components the print button?
Thanks in advance
Klaus
This discussion has been closed.
Comments
You can access the buttons directly from the report object or create a
custom preview as you did in RB 6.
Accessing the buttons from the report...
uses
ppPrvDlg;
procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
begin
TppPrintPreview(ppReport1.PreviewForm).PrintButton.Visible := False;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks a lot for the answer.
In RB 6 the print button was a TSpeedButton, so I could use the
OnMouseUp event to get the shift state.
In RB 10 the print button is a TppTBXItem, which is a descendant of
TComponent, which has only OnClick.
Is there any way to get the shift state when clicking on the print button?
Thank you very much for your answer,
Klaus
Nico Cizik (Digital Metaphors) schrieb:
I looked at the TB/TBX source but do not see a way to do that. The
architecture is such that each tool Item, such as a button, has an
associated ItemView and ItemViewer class. This provides a model view
controller type of architecture, but does makes extending things more
complex.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com