pyGTK identify a button

Chris Angelico rosuav at gmail.com
Wed May 25 04:58:16 EDT 2011


On Wed, May 25, 2011 at 6:18 PM, Tracubik <affdfsdfdsfsd at b.com> wrote:
> Hi all,
> i'm trying to write a simple windows with two button in GTK, i need a way to
> identify wich button is pressed.
> Consider that:
>
> the two button are connected (when clicked) to infoButton(self, widget,
> data=None)

I'm not terribly familiar with GTK, but I believe the 'widget'
parameter is the button that was clicked on. Whatever means you have
for distinguishing them (saving another reference to each object in a
named variable, etc), you should be able to do with that parameter.

Chris Angelico



More information about the Python-list mailing list