Development Team/Almanac/sugar.graphics.toolbutton: Difference between revisions
No edit summary |
No edit summary |
||
| Line 17: | Line 17: | ||
self._edit_toolbar.insert(customButton, -1) | self._edit_toolbar.insert(customButton, -1) | ||
customButton.show() | customButton.show() | ||
=== How do I connect my tool button to a callback? === | === How do I connect my tool button to a callback? === | ||
| Line 28: | Line 29: | ||
def _custom_clicked_cb(self, widget): | def _custom_clicked_cb(self, widget): | ||
#Begin any callback code here | #Begin any callback code here | ||
=== What is a tooltip and how do I set it for my tool button? === | === What is a tooltip and how do I set it for my tool button? === | ||
| Line 34: | Line 36: | ||
#Set the tooltip for the customButton to "Custom" | #Set the tooltip for the customButton to "Custom" | ||
customButton.set_tooltip(_('Custom')) | customButton.set_tooltip(_('Custom')) | ||
=== How do I reset the icon displayed for my tool button? === | === How do I reset the icon displayed for my tool button? === | ||