sugar4.graphics.toggletoolbutton
STABLE.
Classes
UI for toggletoolbutton. |
Module Contents
- class sugar4.graphics.toggletoolbutton.ToggleToolButton(icon_name=None)[source]
Bases:
gi.repository.Gtk.ToggleButtonUI for toggletoolbutton. A ToggleToolButton is a toggle button widget that can be used in toolbars, having an icon, a tooltip palette, and an accelerator. Use ToggleToolButton() to create a new ToggleToolButton.
- Parameters:
accelerator (string) – keyboard shortcut to be used to
button. (hovers over toggle)
here (Find about format)
https – //docs.gtk.org/gtk4/func.accelerator_parse.html
tooltip (string) – tooltip to be displayed when user
button.
- Keyword Arguments:
icon_name (string) – name of themed icon which is to be used.
- set_icon_name(icon_name)[source]
Sets the icon for the tool button from a named themed icon. If it is none then no icon will be shown.
- Parameters:
icon_name (string) – The name for a themed icon.
too. (It can be set as 'None')
Example
set_icon_name(‘view-radial’)
- get_icon_name()[source]
The get_icon_name() method returns the value of the icon_name property that contains the name of a themed icon or None.
- set_tooltip(text)[source]
Sets the tooltip of the toogle tool button. Displays when user hovers over the button with cursor.
- Parameters:
tooltip (string) – tooltip to be added to the button
- set_accelerator(accelerator)[source]
Sets keyboard shortcut that activates this button.
- Parameters:
accelerator (string) – accelerator to be set. Should be in
<modifier>Letter (form)
here (Find about format)
https – //docs.gtk.org/gtk4/func.accelerator_parse.html
Example
set_accelerator(self, ‘accel’)