Changes
Development Team/Almanac/sugar.activity.activity (view source)
Revision as of 11:21, 2 June 2008
, 11:21, 2 June 2008no edit summary
activity.Activity.__init__(self, handle)
activity.Activity.__init__(self, handle)
= Class: ActivityToolbar, ActivityToolbox =
= Class: ActivityToolbox =
=== What is the standard toolbar needed in most activities and how do I create it? ===
=== What is the standard toolbox 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.
The ActivityToolbox is the standard toolbox that should be a part of any sugar activity. This toolbox starts out with an ActivityToolbar, which contains standard controls for saving to the journal, closing the activity and other basic activity tasks.
To create a standard ActivityToolbox for your activity, place the following code in your activity's __init__ method:
#### CREATE TOOLBOX
#### CREATE TOOLBOX