[pygtk] Default buttons in many notebook pages
Udo Spallek
udono at gmx.net
Mon Feb 7 04:14:24 WST 2011
Hello,
is there a simple solution for this problem:
Create a gtk.Notebook() with tabs (gtk.VBox()'s as pages).
Each tab should have some gtk.Button()s.
Each tab should have a default button.
When changing in a tab, the default button of the tab should activate on
pressing enter.
My Solution looks like this:
http://paste.pocoo.org/show/333211/
The default button of each tab is saved in a 'global' dict (line#58).
The default button for a tab is set on each change of a notebook tab
(line#34). My solution feels complicated, but I see no other way. Any
better idea is welcome.
Regards
Udo Spallek
www.tryton.org
More information about the pygtk
mailing list