Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to customize the showPrintPreview() window

    Hello,

    we currently utilize the showPrintPreview in most of our reports. Unfortunately, we have some clients that "miss" the X-button to close the window and get back to the main application. Instead, they close the tab, which is unfortunate.

    My quick question - is there an easy way to customize that button to make it say "back" in the client language? Is there any documentation regarding how to customize that window?

    Pointers much appreciated, since i haven't found much in the javadoc.

    #2
    Bumping this in hope for a pointer.

    What i'm after is a way to replace the standard 'X' in a Window with something else in the PrintPreview.

    Can't really find a good way to do it by going through the docs.

    Comment


      #3
      You could do this via the AutoChild system - PrintWindow extends Window, which has a "closeButton" autoChild.

      Comment


        #4
        Yeah, well that "X" is an imagebutton. If i want i18n support i'd have to fiddle a lot in photoshop.

        Is there a way for that imagebutton to be a regular button, like the printbutton?

        Comment


          #5
          Yes - see the AutoChildren overview - you can change the constructor to a different class.

          Comment


            #6
            1. i can't seem to change the constructor. I tried this. am i close? (tried "constructor" too)

            Code:
            isc.PrintWindow.changeDefaults("closeButtonDefaults", {
                    		buttonConstructor: "IButton",
                        height: 19,
                        width:19
                    });
            2. IF (and that's a big if...) i get this working, i'd still need to access the button from within the code, at the point i'm about to show the print preview, since i want the text to be in the correct language. How would i do that? I'm currently using the following code to show the print preview:
            Code:
            anvas.showPrintPreview(new Canvas[]{headerAssembler.assemblePrintHeader(), reportGrid} );
            There is a "window" that you can pass in with properties, but that's a window, not a print window.

            Comment

            Working...
            X