Changes
Jump to navigation
Jump to search
Line 9:
Line 9:
− #### CUSTOM TOOL BUTTON
+
Development Team/Almanac/sugar.graphics.toolbutton (view source)
Revision as of 14:46, 29 May 2008
, 14:46, 29 May 2008→How do I create my own custom tool button?
# Use the code below to guide you on how to then create your button programmatically and add it to a tool bar (we add it to an EditToolbar object that was presumably created already in our code).
# Use the code below to guide you on how to then create your button programmatically and add it to a tool bar (we add it to an EditToolbar object that was presumably created already in our code).
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.toolbutton import ToolButton
...
...
#### CUSTOM TOOL BUTTON
#Create a custom tool button and add it to the edit toolbar
#Create a custom tool button and add it to the edit toolbar
customButton = ToolButton('edit-custom')
customButton = ToolButton('edit-custom')