On Wed, 25 May 2011 10:18:48 +0200, Tracubik 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)
>
> infoButton()
Tracubik 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.
>
#!/usr/bin/env python
import gtk
def console_display( button , args ) :
a0 , a1 , a2 = args
print '%s %s %s ' % ( a0 , a1 , a2
> thanks but, as i've sayed before, i can't use func_data 'cause i don't
> know how to set it on glade3.8, that is the program i use to create
> the
> GUI.
> Anyway, i think this is the only way to identify the button :-/
Hack into the generated source!
--
Claudiu Nicolaie CISMARU
GNU GPG
On Wed, May 25, 2011 at 6:18 PM, Tracubik 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 f
On 25/05/2011 10:44, Claudiu Nicolaie CISMARU wrote:
the two button are connected (when clicked) to infoButton(self,
widget,
data=None)
From documentation:
handler_id = object.connect(name, func, func_data)
So:
button1.connect(when is pressed, your_function, 1)
button2.connect(when is presse
> the two button are connected (when clicked) to infoButton(self,
> widget,
> data=None)
From documentation:
handler_id = object.connect(name, func, func_data)
So:
button1.connect(when is pressed, your_function, 1)
button2.connect(when is pressed, your_function, 2)
(This code is conception, I
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)
infoButton() is something like this
infoButton(self, widget, data=None):