Changes

Jump to navigation Jump to search
Line 19: Line 19:     
=== 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
Anonymous user

Navigation menu