Development Team/Almanac/sugar.graphics.toolbox: Difference between revisions

No edit summary
No edit summary
Line 14: Line 14:


=== How do I remove a toolbar from a toolbox? ===
=== How do I remove a toolbar from a toolbox? ===
In order to remove a toolbar from a toolbox, you first need to know the index of that toolbar so you can pass it to the remove_toolbar() method. Once you know this, you can run something like:
        #Remove the toolbar with index number 1.
        toolbox.remove_toolbar(1)


=== How do I programmatically change the active toolbar in a toolbox? ===
=== How do I programmatically change the active toolbar in a toolbox? ===
        #Set the active toolbar using an integer index assigned to each toolbar in your activity.
        self.toolbox.set_current_toolbar(1);