1 title = 'Pmw.NoteBook demonstration'
3 # Import Pmw from this directory tree.
5 sys.path[:0] = ['../../..']
11 def __init__(self, parent):
12 # Create and pack the NoteBook.
13 notebook = Pmw.NoteBook(parent)
14 notebook.pack(fill = 'both', expand = 1, padx = 10, pady = 10)
16 # Add the "Appearance" page to the notebook.
17 page = notebook.add('Appearance')
18 notebook.tab('Appearance').focus_set()
20 # Create the "Toolbar" contents of the page.
21 group = Pmw.Group(page, tag_text = 'Toolbar')
22 group.pack(fill = 'both', expand = 1, padx = 10, pady = 10)
23 b1 = Tkinter.Checkbutton(group.interior(), text = 'Show toolbar')
24 b1.grid(row = 0, column = 0)
25 b2 = Tkinter.Checkbutton(group.interior(), text = 'Toolbar tips')
26 b2.grid(row = 0, column = 1)
28 # Create the "Startup" contents of the page.
29 group = Pmw.Group(page, tag_text = 'Startup')
30 group.pack(fill = 'both', expand = 1, padx = 10, pady = 10)
31 home = Pmw.EntryField(group.interior(), labelpos = 'w',
32 label_text = 'Home page location:')
33 home.pack(fill = 'x', padx = 20, pady = 10)
35 # Add two more empty pages.
36 page = notebook.add('Helpers')
37 page = notebook.add('Images')
39 notebook.setnaturalsize()
41 ######################################################################
43 # Create demo in root window for testing.
44 if __name__ == '__main__':
50 exitButton = Tkinter.Button(root, text = 'Exit', command = root.destroy)