PasswordEntry


Object Hierarchy:

Gtk.PasswordEntry Gtk.PasswordEntry Gtk.PasswordEntry Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.PasswordEntry GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Gtk.PasswordEntry Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.PasswordEntry Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Gtk.PasswordEntry Gtk.ConstraintTarget->Gtk.Widget Gtk.Editable Gtk.Editable Gtk.Editable->Gtk.PasswordEntry

Description:

[ CCode ( type_id = "gtk_password_entry_get_type ()" ) ]
public sealed class PasswordEntry : Widget, Accessible, Buildable, ConstraintTarget, Editable

`GtkPasswordEntry` is an entry that has been tailored for entering secrets.

![An example GtkPasswordEntry](password-entry.png)

It does not show its contents in clear text, does not allow to copy it to the clipboard, and it shows a warning when Caps Lock is engaged. If the underlying platform allows it, `GtkPasswordEntry` will also place the text in a non-pageable memory area, to avoid it being written out to disk by the operating system.

Optionally, it can offer a way to reveal the contents in clear text.

`GtkPasswordEntry` provides only minimal API and should be used with the [iface@Gtk.Editable] API.

CSS Nodes

``` entry.password ╰── text ├── image.caps-lock-indicator ┊ ```

`GtkPasswordEntry` has a single CSS node with name entry that carries a .passwordstyle class. The text Css node below it has a child with name image and style class .caps-lock-indicator for the Caps Lock icon, and possibly other children.

Accessibility

`GtkPasswordEntry` uses the gtk_accessible_role_text_box role.


Namespace: Gtk
Package: gtk4

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class Gtk.Widget