Diable items in Print Dialog ?
Greetings,
I was wondering how certain items can be disabled in the PrintDialog of a
report. For example I would like to be able to disable the Current Page and
the Pages radio buttons in the Page Range Group Box and the drop down box
which allows you to print All, Odd, or Even pages in the selected range. I
saw the EnableAutoRange and DisableAutoRange properties but I could not find
them in the help and when it was set I didn't see any changes to the
PrintDialog.
Thanks in advance for any help,
Jeff
I was wondering how certain items can be disabled in the PrintDialog of a
report. For example I would like to be able to disable the Current Page and
the Pages radio buttons in the Page Range Group Box and the drop down box
which allows you to print All, Odd, or Even pages in the selected range. I
saw the EnableAutoRange and DisableAutoRange properties but I could not find
them in the help and when it was set I didn't see any changes to the
PrintDialog.
Thanks in advance for any help,
Jeff
This discussion has been closed.
Comments
OnPrintDialogCreate event.
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I have the following code in place:
// ************************************
procedure TFrmMain.ppReport1PrintDialogCreate(Sender: TObject);
begin
ppReport1.PrintDialog.DisableAutoRange;
end;
//**************************************
However when the Print Dialog is displayed none of the page ranges are
disabled. You can select any radio button in the Page Range group box and
enter any value in the text box next the the Pages radio button.
How can I get these fields disabled so they may not be chosen?
Thanks,
Jeff
"Alexander Kramnik (Digital Metaphors)" wrote
TScrollingWindow, it temporarily disables scrolling. You need to directly
access components of the window to change their state. For example the code
below will disable the page range checkbox and editbox. See the ppPDlg unit
for names of the rest of the components on the dialog.
procedure TForm1.ppReport1PrintDialogCreate(Sender: TObject);
begin
TppPrintDialog(ppReport1.PrintDialog).edtPageRange.Enabled := False;
TppPrintDialog(ppReport1.PrintDialog).rdbPages.Enabled := False;
end;
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com