[pygtk] how to set the active radiobutton without emitting a toggle or clicked signal?
Giuseppe Penone
giuspen at gmail.com
Sat Apr 23 19:17:17 WST 2011
I have a variable in my program named "user_active" which is by default True
when I want to toggle avoiding the signal I do:
user_active = False
operation that causes the signal
user_active = True
then in the callback
on_button_toggled()
if not user_active: return
....
Cheers,
Giuseppe.
On Sat, Apr 23, 2011 at 7:50 AM, Ryan Krauss <ryanlists at gmail.com> wrote:
> I am setting the active radio button in a group using the set_active
> method. I want to do this without causing the toggled or clicked
> signals being emitted, or I at least want to somehow know the
> difference in the program between the programming setting the active
> radio and the user actually clicking the radio with the mouse (or by
> using a keyboard accelerator that is mapped to "click"). Basically, I
> have some code I want to run only when the user really clicked or used
> a keyboard accel. I don't want the code to run when the program set
> the radio. How can this be accomplished?
>
> Thanks,
>
> Ryan
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20110423/4bd37815/attachment.html>
More information about the pygtk
mailing list