Changes
Jump to navigation
Jump to search
Line 51:
Line 51:
+
+
+
+
+
+
+
+
Development Team/Almanac/sugar.activity.activity (view source)
Revision as of 11:01, 29 May 2008
, 11:01, 29 May 2008no edit summary
#hide the undo button
#hide the undo button
self._edit_toolbar.undo.props.visible=False
self._edit_toolbar.undo.props.visible=False
=== How do I disable and enable a button on the edit toolbar? ===
Some buttons, such as copy, may need to be disabled under certain circumstances (eg. there is nothing to copy). This can be done by changing the sensitivity of the widget, as the following code shows:
#disable the use of the copy button for now.
self._edit_toolbar.copy.set_sensitive(False)