2
# a dialog box with a local grab (called by 'widget')
4
class TkDialog_Demo1 < TkDialog
9
"Dialog with local grab"
13
'This is a modal dialog box. It uses Tk\'s "grab" command to create a "local grab" on the dialog box. The grab prevents any pointer-related events from getting to any other windows in the application until you have answered the dialog by invoking one of the buttons below. However, you can still interact with other applications.'
25
# ["Dismiss", "", "Show Code"]
26
["OK", "Cancel", "Show Code"]
30
ret = TkDialog_Demo1.new('message_config'=>{'wraplength'=>'4i'}).value
33
print "You pressed OK\n"
35
print "You pressed Cancel\n"