To add a PageTurner widget to your Tkinter application, use
this procedure:
Instantiate the widget in some parent window, and grid it.
Let's call the instance . Here's the general form of
the constructor:
PT
PT= PageTurner ( master=None, size=None )PT.grid(...)
is the parent widget in which you want to create the
masterPageTurner 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
the form size=( where w,
h) is the width and
w the
width of the area, expressed in pixels.
h
If you want to display anything between the button
frame and the page viewing area, place the material
into the Frame widget
.
PT.headFrame
Create Frame widgets for each
content page; each such widget should have as its
parent. Then for each content page frame Pt, call the
f
method to add the frame as the next page.
PT.addPage(f)
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
PT.setPageNo(n), counting from 1. The default value for n is 1, the
first content page.
n