1 title = 'Pmw.TextDialog demonstration'
3 # Import Pmw from this directory tree.
5 sys.path[:0] = ['../../..']
11 def __init__(self, parent):
13 dialog = Pmw.TextDialog(parent, scrolledtext_labelpos = 'n',
14 title = 'My TextDialog',
16 label_text = 'Lawyer jokes')
18 dialog.insert('end', jokes)
19 dialog.configure(text_state = 'disabled')
21 # Create button to launch the dialog.
22 w = Tkinter.Button(parent, text = 'Show text dialog',
23 command = dialog.activate)
24 w.pack(padx = 8, pady = 8)
27 Q: What do you call 5000 dead lawyers at the bottom of the ocean?
30 Q: How can you tell when a lawyer is lying?
31 A: His lips are moving.
33 Q: Why won't sharks attack lawyers?
34 A: Professional courtesy.
36 Q: What do have when a lawyer is buried up to his neck in sand?
39 Q: How do you get a lawyer out of a tree?
42 Q: What is the definition of a shame (as in "that's a shame")?
43 A: When a bus load of lawyers goes off a cliff.
45 Q: What is the definition of a "crying shame"?
46 A: There was an empty seat.
48 Q: What do you get when you cross the Godfather with a lawyer?
49 A: An offer you can't understand.
51 Q. What do lawyers use as contraceptives?
52 A. Their personalities.
54 Q. What's brown and black and looks good on a lawyer?
57 Q. Why are lawyers buried 12 feet underground?
58 A. Deep down their good.
60 Q. What's the difference between a catfish and a lawyer?
61 A. One's a slimy scum-sucking scavenger, the other is just a fish.
64 ######################################################################
66 # Create demo in root window for testing.
67 if __name__ == '__main__':
72 exitButton = Tkinter.Button(root, text = 'Exit', command = root.destroy)
73 exitButton.pack(side = 'bottom')