Changes

Line 8: Line 8:  
  from sugar.activity import activity
 
  from sugar.activity import activity
 
  ...
 
  ...
  class ToolbarExample(activity.Activity):
+
  class ToolbarExampleActivity(activity.Activity):
 
   
 
   
 
     def __init__(self, handle):
 
     def __init__(self, handle):
 
         activity.Activity.__init__(self, handle)
 
         activity.Activity.__init__(self, handle)
 +
 +
=== What is the standard toolbar needed in most activities and how do I create it? ===
 +
The Activity toolbar with the Journal entry title, sharing, Keep and Stop buttons is the most basic toolbar. All activities should have this toolbar. It is easiest to add it to your Activity by using the ActivityToolbox.
 +
 +
        #### CREATE TOOLBOX
 +
        # Creates the Toolbox. It contains the Activity Toolbar, which is the
 +
        # bar that appears on every Sugar window and contains essential
 +
        # functionalities, such as the 'Collaborate' and 'Close' buttons.
 +
        toolbox = activity.ActivityToolbox(self)
 +
        self.set_toolbox(toolbox)
 +
        toolbox.show()
Anonymous user