Creating dynamical buttons

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Creating dynamical buttons

Petr Hracek
Hi folks,

I have simple question but I do not know how to do that?
Let's say that I have script which returns in option help following:
./myscript --help
-- run
-- update
-- configuration
-- testing

I would like to create GUI which will have label, those 4 checkbuttons and last button called "TEST"
I would like to create those 4 buttons dynamically so that when user will click on "TEST" button
I will check whether specific button was activate or not.

Buttons are created now like this:

button = Gtk.CheckButton(sub.kwargs['help']) # which will returns run/update/configuration/testing

button.connect("clicked", self.button_clicked)
self.boxFinal.pack_start(button, False, False, 0)

How to check what button was activate?
Over the label?
-- 
S pozdravem / Best regards

Petr Hracek

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/