This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Nikolay.Fomichev
Recipients Nikolay.Fomichev
Date 2011-03-03.18:30:13
SpamBayes Score 1.8588e-08
Marked as misclassified No
Message-id <>
A simple code:

class App():  
    def __init__(self):
        self.root = tk.Tk()
        self.btn = tk.Button(self.root, text='Click me')

    def click(self, event):
        # Messagebox or filedialog

When the button is clicked, it calls the function where a filedialog or messagebox is called. After the function is done the button changes - it looks like it's pressed. Its relief is sunken. Something like "self.btn.config(relief=tk.RAISED)" has no effect - relief is raised, but the button still looks pressed.
If no dialogs are called, all is fine.

But... if instead of "bind" I use config option "command", it works - the function goes well with dialogs, etc and the button is really raised.

I checked this in 2.6.6, 2.7, 3.1.2 and 3.2 on Linux and Win, everywhere is the same tune.
Date User Action Args
2011-03-03 18:30:14Nikolay.Fomichevsetrecipients: + Nikolay.Fomichev
2011-03-03 18:30:14Nikolay.Fomichevsetmessageid: <>
2011-03-03 18:30:13Nikolay.Fomichevlinkissue11387 messages
2011-03-03 18:30:13Nikolay.Fomichevcreate