问题描述
您好,
有没有办法从printPreviewDialog调用printDialog(例如来自print
图标)?
确实,printpreviewdialog中的打印图标直接打印
文档而不用手工打印printdialog(即用户无法选择
打印参数)。 />
非常感谢。
Hello,
Is there a way to call a printDialog from a printPreviewDialog (from print
icon for example)?
Indeed, the print icon in the printpreviewdialog prints directly the
document without lunching the printdialog (i.e. the user can''t choose the
print parameters).
Thanks a lot.
推荐答案
我最终创建了一个File --Print ...菜单选项,打开了
打印对话框。
关于打印预览对话框的一个令人恼火的事情是你需要改变的很多东西(比如这个特别的
点) )是私人的在控制范围内,因此不可更改。我希望
能够看到受保护的方法,比如
OnPrintButtonClick等,这样就可以覆盖这种行为。
如果我们想要隐藏/禁用
工具栏上的按钮也是很好的,即使唯一的方法是设置一个
PrintButtonEnabled属性或类似的东西。
PrintPreviewDialog和TabControl是
..NET中的两个hokier控件。我希望有一天他们会重新审视它们并做出急需的改进。
I ended up creating a File --Print... menu option that brings up the
print dialog.
One of the irritating things about the print preview dialog is that a
lot of things that you would want to change (like this particular
point) are "private" within the control and therefore not changeable. I
would have liked to have seen protected methods like
OnPrintButtonClick, etc, so that one could override the behaviour.
It would also have been nice to be able to hide / disable buttons on
the toolbar if we wanted to, even if the only way were to set a
PrintButtonEnabled property or something like that.
PrintPreviewDialog and TabControl are two of the hokier controls in
..NET. I hope that someday they''ll revisit them and make much-needed
improvements.
我最终创建了一个File --Print ...菜单选项,打开了
打印对话框。
关于打印预览对话框的一个令人恼火的事情是你需要改变的很多东西(比如这个特别的
点) )是私人的在控制范围内,因此不可更改。我希望
能够看到受保护的方法,比如
OnPrintButtonClick等,这样就可以覆盖这种行为。
如果我们想要隐藏/禁用
工具栏上的按钮也是很好的,即使唯一的方法是设置一个
PrintButtonEnabled属性或类似的东西。
PrintPreviewDialog和TabControl是
.NET中的两个hokier控件。我希望总有一天他们会重新审视它们并做出急需的改进。
I ended up creating a File --Print... menu option that brings up the
print dialog.
One of the irritating things about the print preview dialog is that a
lot of things that you would want to change (like this particular
point) are "private" within the control and therefore not changeable. I
would have liked to have seen protected methods like
OnPrintButtonClick, etc, so that one could override the behaviour.
It would also have been nice to be able to hide / disable buttons on
the toolbar if we wanted to, even if the only way were to set a
PrintButtonEnabled property or something like that.
PrintPreviewDialog and TabControl are two of the hokier controls in
.NET. I hope that someday they''ll revisit them and make much-needed
improvements.
这篇关于从PrintPreviewDialog访问printDialog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!