What is the name of the event when the user clicks the X button at the upper right corner of the window? How will I override that function?
            Asked
            
        
        
            Active
            
        
            Viewed 2,089 times
        
    1 Answers
2
            
            
        root = Tk.tk()
root.protocol('WM_DELETE_WINDOW', callback)
I believe
 
    
    
        SamBG
        
- 270
- 4
- 16
- 
                    1Thank you for the code snippet, which might provide some limited, immediate help. A proper explanation would greatly improve its [long-term value](https://meta.stackexchange.com/q/114762/206345) by describing why this is a good solution to the problem, and would make it more useful to future readers with other similar questions. Please edit your answer to add some explanation, including the assumptions you've made. – sepehr Oct 23 '18 at 15:13

