On Mon, Jun 30, 2003 at 10:05:47AM -0500, Adam Harder wrote:
> How do you set up a global lock?  How is it bound to a toggle button?  Or,
> based on the state of the lock, how do I control whether the button is active
> or not?  Sorry, I'm really new.  Thanks for your help.

Just do something like:

lock = 0

def clicked(*args):
  if lock:
    return
  # ...

lock = 1
button.clicked()
lock = 0

button.clicked() # normal click

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to