Changes
Development Team/Almanac/sugar.graphics.toolbutton (view source)
Revision as of 09:36, 2 June 2008
, 09:36, 2 June 2008→Class: ToolButton ([http://www.pygtk.org/docs/pygtk/ gtk.ToolButton])
=== How do I connect my tool button to a callback? ===
=== How do I connect my tool button to a callback? ===
The following code fragment connects a button to a callback ...
#When the customButton fires a "clicked" event, call self._custom_clicked_cb
customButton.connect('clicked', self._custom_clicked_cb)
... which is then defined elsewhere in the class.
#CALLBACK METHOD
def _custom_clicked_cb(self, widget):
#Begin any callback code here