sugar4.graphics.radiotoolbutton
RadioToolButton
Provides a RadioToolButton class, similar to a “push” button. A group of RadioToolButtons can be set, so that only one can be selected at a time. When a button is clicked, it depresses and is shaded darker.
It is also possible to set a tooltip to be dispalyed when the user scrolls over it with their cursor as well as an accelerator keyboard shortcut.
Attributes
Classes
A toolbar button that acts as a radio button. |
Module Contents
- class sugar4.graphics.radiotoolbutton.RadioToolButton(group=None, **kwargs)[source]
Bases:
sugar4.graphics.toolbutton.ToolButtonA toolbar button that acts as a radio button.
Radio tool buttons work in groups where only one button can be active at a time. When one button is activated, all others in the group are automatically deactivated.
Initialize the radio tool button.
- Parameters:
group – Another RadioToolButton to group with, or None for new group
**kwargs – Additional arguments passed to ToolButton
- set_group(group_member)[source]
Set the radio group by specifying another member.
- Parameters:
group_member – Another RadioToolButton to join groups with