Gtk.ShortcutLabel

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Box Gtk.Box Gtk.ShortcutLabel Gtk.ShortcutLabel Gtk.Box->Gtk.ShortcutLabel Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Subclasses:None

Properties

Inherited:Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name Type Flags Short Description
accelerator str r/w Accelerator
disabled-text str r/w Disabled text

Child Properties

Inherited:Gtk.Box (5)

Style Properties

Inherited:Gtk.Widget (17)

Class Details

class Gtk.ShortcutLabel(*args, **kwargs)
Bases:Gtk.Box
Abstract:No
Structure:Gtk.ShortcutLabelClass

Gtk.ShortcutLabel is a widget that represents a single keyboard shortcut or gesture in the user interface.

classmethod new(accelerator)[source]
Parameters:accelerator (str) – the initial accelerator
Returns:a newly-allocated Gtk.ShortcutLabel
Return type:Gtk.Widget

Creates a new Gtk.ShortcutLabel with accelerator set.

New in version 3.22.

get_accelerator()[source]
Returns:the current accelerator.
Return type:str or None

Retrieves the current accelerator of self.

New in version 3.22.

get_disabled_text()[source]
Returns:the current text displayed when no accelerator is set.
Return type:str or None

Retrieves the text that is displayed when no accelerator is set.

New in version 3.22.

set_accelerator(accelerator)[source]
Parameters:accelerator (str) – the new accelerator

Sets the accelerator to be displayed by self.

New in version 3.22.

set_disabled_text(disabled_text)[source]
Parameters:disabled_text (str) – the text to be displayed when no accelerator is set

Sets the text to be displayed by self when no accelerator is set.

New in version 3.22.

Property Details

Gtk.ShortcutLabel.props.accelerator
Name:accelerator
Type:str
Default Value:None
Flags:READABLE, WRITABLE

The accelerator that self displays. See Gtk.ShortcutsShortcut :accelerator for the accepted syntax.

New in version 3.22.

Gtk.ShortcutLabel.props.disabled_text
Name:disabled-text
Type:str
Default Value:None
Flags:READABLE, WRITABLE

The text that is displayed when no accelerator is set.

New in version 3.22.