(self, parent, title, action, current_key_sequences,
                 *, _htest=False, _utest=False)
parent - parent of this dialog
        title - string which is the title of the popup dialog
        action - string, the name of the virtual event these keys will be
                 mapped to
        current_key_sequences - list, a list of all key sequence lists
                 currently mapped to virtual events, for overlap checking
        _htest - bool, change box location when running htest
        _utest - bool, do not wait when running unittest
parent - parent of this dialog
        title - string which is the title of the popup dialog
        action - string, the name of the virtual event these keys will be
                 mapped to
        current_key_sequences - list, a list of all key sequence lists
                 currently mapped to virtual events, for overlap checking
        _htest - bool, change box location when running htest
        _utest - bool, do not wait when running unittest
parent - parent of this dialog title - string which is the title of the popup dialog action - string the name of the virtual event these keys will be mapped to current_key_sequences - list a list of all key sequence lists currently mapped to virtual events for overlap checking _htest - bool change box location when running htest _utest - bool do not wait when running unittest
def __init__(self, parent, title, action, current_key_sequences,
                 *, _htest=False, _utest=False):
        """
        parent - parent of this dialog
        title - string which is the title of the popup dialog
        action - string, the name of the virtual event these keys will be
                 mapped to
        current_key_sequences - list, a list of all key sequence lists
                 currently mapped to virtual events, for overlap checking
        _htest - bool, change box location when running htest
        _utest - bool, do not wait when running unittest
        """
        Toplevel.__init__(self, parent)
        self.withdraw()  # Hide while setting geometry.
        self.configure(borderwidth=5)
        self.resizable(height=False, width=False)
        self.title(title)
        self.transient(parent)
        _setup_dialog(self)
        self.grab_set()
        self.protocol("WM_DELETE_WINDOW", self.cancel)
        self.parent = parent
        self.action = action
        self.current_key_sequences = current_key_sequences
        self.result = ''
        self.key_string = StringVar(self)
        self.key_string.set('')
        # Set self.modifiers, self.modifier_label.
        self.set_modifiers_for_platform()
        self.modifier_vars = []
        for modifier in self.modifiers:
            variable = StringVar(self)
            variable.set('')
            self.modifier_vars.append(variable)
        self.advanced = False
        self.create_widgets()
        self.update_idletasks()
        self.geometry(
                "+%d+%d" % (
                    parent.winfo_rootx() +
                    (parent.winfo_width()/2 - self.winfo_reqwidth()/2),
                    parent.winfo_rooty() +
                    ((parent.winfo_height()/2 - self.winfo_reqheight()/2)
                    if not _htest else 150)
                ) )  # Center dialog over parent (or below htest box).
        if not _utest:
            self.deiconify()  # Geometry set, unhide.
            self.wait_window()
def __init__ ( self , parent , title , action , current_key_sequences , * , _htest = False , _utest = False ) : Toplevel . __init__ ( self , parent ) self . withdraw ( ) # Hide while setting geometry. self . configure ( borderwidth = 5 ) self . resizable ( height = False , width = False ) self . title ( title ) self . transient ( parent ) _setup_dialog ( self ) self . grab_set ( ) self . protocol ( "WM_DELETE_WINDOW" , self . cancel ) self . parent = parent self . action = action self . current_key_sequences = current_key_sequences self . result = '' self . key_string = StringVar ( self ) self . key_string . set ( '' ) # Set self.modifiers, self.modifier_label. self . set_modifiers_for_platform ( ) self . modifier_vars = [ ] for modifier in self . modifiers : variable = StringVar ( self ) variable . set ( '' ) self . modifier_vars . append ( variable ) self . advanced = False self . create_widgets ( ) self . update_idletasks ( ) self . geometry ( "+%d+%d" % ( parent . winfo_rootx ( ) + ( parent . winfo_width ( ) / 2 - self . winfo_reqwidth ( ) / 2 ) , parent . winfo_rooty ( ) + ( ( parent . winfo_height ( ) / 2 - self . winfo_reqheight ( ) / 2 ) if not _htest else 150 ) ) ) # Center dialog over parent (or below htest box). if not _utest : self . deiconify ( ) # Geometry set, unhide. self . wait_window ( )