AskThumbnails (prompt for new thumbnail configuration)

Top  Previous  Next

 

AskThumbnails, VIRTUAL, PROTECTED

The AskThumbnails method prompts the end user for the number of pages to tile across and down the preview window.

Implementation:

The PrintPreviewClass.Display method calls the AskThumbnails method. The AskThumbnails method displays a dialog that prompts for the number of thumbnails to display horizontally, and the number of thumbnails to display vertically.

Example:

!Virtual implementation of AskThumbnails

! a slightly simplified version with no translator...

PrintPreviewClass.AskThumbnails PROCEDURE

 

SelectWindow WINDOW('Pages Displayed'),AT(,,141,64),GRAY,DOUBLE

      GROUP('Across'),AT(7,10,62,32),BOXED

       SPIN(@N2),AT(13,22,15),USE(SELF.PagesAcross,,?PagesAcross),RANGE(1,10)

      END

      GROUP('Down'),AT(72,10,62,32),BOXED

       SPIN(@N2),AT(79,22,15),USE(SELF.PagesDown,,?PagesDown),RANGE(1,10)

      END

      BUTTON('OK'),AT(98,47,40,14),KEY(EnterKey),USE(?OK)

            END

 

  CODE

  OPEN(SelectWindow)

  ACCEPT

    CASE EVENT()

    OF EVENT:Accepted

      CASE FIELD()

      OF ?OK

        IF SELF.PagesAcross*SELF.PagesDown>RECORDS(SELF.ImageQueue)

          SELECT(?PagesAcross)

        ELSE

          POST(EVENT:CloseWindow)

        END

      END

    END

  END

  CLOSE(SelectWindow)