[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: Enter Enter... troubles
From:       "Hendrik van Rooyen" <mail () microcorp ! co ! za>
Date:       2007-02-16 5:46:43
Message-ID: 007501c7518d$d70de880$03000080 () hendrik
[Download RAW message or body]

 Sorin Schwimmer  wrote:

8<-------------------------
>   def handler(self,event):
>    self.aButton.unbind('<Return>')
>    self.aButton.unbind('<KP_Enter>')
8<-------------------------
>
>The idea is to prevent a fast user (like my boss) to press repeatedly the
"enter"
>key and create havoc with self.property and localVar. But it doesn't work: my
>boss manages to start at least twice the handler (which, among other things
>creates a Toplevel, so I end up with a messy screen).

I would have separate handlers for the two keys - should be slightly faster..

I generally use configure to change the button's command to a do nothing thing
to sort out the multiple click maniacs.

hth - Hendrik

-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic