User Tools

Site Tools


askthumbnails_prompt_for_new_thumbnail_configuration_.htm
Navigation:  ABC Library Reference > PrintPreviewClass > PrintPreviewClass Methods >====== AskThumbnails (prompt for new thumbnail configuration) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

AskThumbnails, VIRTUAL, PROTECTED

blk2blue.jpg

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)

askthumbnails_prompt_for_new_thumbnail_configuration_.htm.txt · Last modified: 2021/04/15 15:56 by 127.0.0.1