Gnome::Gtk4::EditableLabel
Table of Contents
Description§
A Gnome::Gtk4::EditableLabel is a label that allows users to edit the text by switching to an āedit modeā.
UNKNOWN image§
=for image :class<inline> :src<asset_files/images/editable-label.png> :width<30\%>Gnome::Gtk4::EditableLabel does not have API of its own, but it implements the Gnome::Gtk4::Text interface.
The default bindings for activating the edit mode is to click or press the Enter key. The default bindings for leaving the edit mode are the Enter key (to save the results) or the Escape key (to cancel the editing).
CSS nodes§
Gnome::Gtk4::EditableLabel has a main node with the name editablelabel. When the entry is in editing mode, it gets the .editing style class.
For all the subnodes added to the text node in various situations, see Gnome::Gtk4::Text.
Uml Diagram§
UNKNOWN image§
=for image :class<inline> :src<asset_files/images/plantuml/EditableLabel.png> :width<70\%>Class initialization§
new§
:native-object§
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
new-editablelabel§
Creates a new Gnome::Gtk4::EditableLabel widget.
method new-editablelabel ( Str $str --> Gnome::Gtk4::EditableLabel )
- $str; the text for the label.
Methods§
get-editing§
Returns whether the label is currently in āediting modeā.
method get-editing (--> Bool )
Return value; True if $self is currently in editing mode.
start-editing§
Switches the label into āediting modeā.
method start-editing ( )
stop-editing§
Switches the label out of āediting modeā.
If $commit is True, the resulting text is kept as the text defined in Gnome::Gtk4::R-Editable property value, otherwise the resulting text is discarded and the label will keep its previous text defined in Gnome::Gtk4::R-Editable property value.
method stop-editing ( Bool() $commit )
- $commit; whether to set the edited text on the label.
About my projects, examples and tutorials