从PrintPreviewDialog访问printDialog [英] Access to a printDialog from a PrintPreviewDialog
问题描述
您好,
有没有办法从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.
推荐答案
choupi写道:
choupi wrote:
您好,
有没有办法从printPreviewDialog调用printDialog(来自print
icon for例子)?
实际上,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.
好的,所以那里'''我无法在我想象的工具栏中添加新按钮?!
" Bruce Wood" < br ******* @canada.comaécritdansle message de news:
11 ********************* @ h54g2000cwb.googlegroups.c om ...
Ok, so there''s no way to add a new button in the toolbar I imagine ?!
"Bruce Wood" <br*******@canada.coma écrit dans le message de news:
11*********************@h54g2000cwb.googlegroups.c om...
>
choupi写道:
>
choupi wrote:
>你好,
有没有办法从printPreviewDialog调用printDialog(例如来自
图标)?
实际上,printpreviewdialog中的print图标直接打印
没有午餐printdialog的文件(即用户不能选择
打印参数)。
非常感谢。
>Hello,
Is there a way to call a printDialog from a printPreviewDialog (from
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.
嗯,我刚刚找到了一个使用Reflection的简单方法,它完美地工作了
。
如果你有兴趣,请告诉我。
谢谢。
Well, I just have found a simple way using Reflection, and it works
perfectly.
Let me know if you''re interested.
Thanks.
这篇关于从PrintPreviewDialog访问printDialog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!