Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
675
Customizing UltraPrintPreviewDialog
posted

My users have asked that the UltraPrintPreviewDialog display the selected printer somewhere on the main dialog so that they don't have to dig down through the Page Setup dialogs to find it.

I haven't found any direct support for this in the dialog itself.

I managed to find out where that value is stored in the UltraPrintDocument object and figured out how to use resource customization on the print preview dialog to display the name of the selected printer in the hover text of the print button on the dialog.

I also managed to check for changes to the selected printer in the dialog activated event and change the resource string there.  However, it appears (and seems logical) that the dialog does not reapply resource settings while it is open.  If the user closes the window and reopens it, the new printer selection is displayed.

Is there some call (I tried Refresh and PerformLayout) that would cause the dialog to reapply resources?

 

Parents
No Data
Reply
  • 54937
    Offline posted

    No, the code that retrieves information from the resources is done when the form is first loaded using a private method. You may be able to use reflection to invoke that method but there is no guarantee that that code wouldn't break in a future version. Since the resources aren't reapplied you could store the original tooltip string (the unlocalized version) and rebuild the tooltip for the print tool with the print information. You could also go a different route and access the publicly exposed ToolbarsManager and add a LabelTool that displays the printer name.

Children
No Data