To add a
PageTurner widget to your Tkinter application, use
Instantiate the widget in some parent window, and grid it.
Let's call the instance
. Here's the general form of
PT= PageTurner ( master=None, size=None )
is the parent widget in which you want to create the
PageTurner widget. If you omit the
size argument, the page viewing area will be
resized for each page as it is displayed. If you want the
page viewing area to have a minimum size, use an argument of
is the width and
width of the area, expressed in pixels.
If you want to display anything between the button
frame and the page viewing area, place the material
Frame widgets for each
content page; each such widget should have
parent. Then for each content page frame
, call the
method to add the frame as the next page.
Do not grid these widgets as you create them. Until the next step, nothing will appear in the page viewing area.
Use the method
to display page
, counting from 1. The default value for
is 1, the
first content page.