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

logger

Classes

RadioToolButton

A toolbar button that acts as a radio button.

Module Contents

sugar4.graphics.radiotoolbutton.logger[source]
class sugar4.graphics.radiotoolbutton.RadioToolButton(group=None, **kwargs)[source]

Bases: sugar4.graphics.toolbutton.ToolButton

A 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

__gtype_name__ = 'SugarRadioToolButton'[source]
__gsignals__[source]
get_group()[source]

Get the list of buttons in this radio group.

set_group(group_member)[source]

Set the radio group by specifying another member.

Parameters:

group_member – Another RadioToolButton to join groups with

get_active()[source]

Get whether this button is active.

set_active(active)[source]

Set the active state of this button.

Parameters:

active – True to activate, False to deactivate

active[source]