Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6214
| References | <4ddcbb68$0$18241$4fafbaef@reader2.news.tin.it> |
|---|---|
| Date | 2011-05-25 18:58 +1000 |
| Subject | Re: pyGTK identify a button |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2062.1306313899.9059.python-list@python.org> (permalink) |
On Wed, May 25, 2011 at 6:18 PM, Tracubik <affdfsdfdsfsd@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
pyGTK identify a button Tracubik <affdfsdfdsfsd@b.com> - 2011-05-25 10:18 +0200
Re: pyGTK identify a button Claudiu Nicolaie CISMARU <claudiu@virtuamagic.com> - 2011-05-25 11:44 +0300
Re: pyGTK identify a button Tracubik <affdfsdfdsfsd@b.com> - 2011-05-25 10:51 +0200
Re: pyGTK identify a button Claudiu Nicolaie CISMARU <claudiu@virtuamagic.com> - 2011-05-25 12:19 +0300
Re: pyGTK identify a button Chris Angelico <rosuav@gmail.com> - 2011-05-25 18:58 +1000
Re: pyGTK identify a button Cousin Stanley <cousinstanley@gmail.com> - 2011-05-25 16:22 +0000
Re: pyGTK identify a button Alister Ware <alister.ware@ntlworld.com> - 2011-05-26 17:50 +0000
csiph-web