TextField


Object Hierarchy:

He.TextField He.TextField He.TextField Gtk.ListBoxRow Gtk.ListBoxRow Gtk.ListBoxRow->He.TextField Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.ListBoxRow GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Gtk.ListBoxRow Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.ListBoxRow Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Gtk.ListBoxRow Gtk.ConstraintTarget->Gtk.Widget Gtk.Actionable Gtk.Actionable Gtk.Actionable->Gtk.ListBoxRow

Description:

public class TextField : ListBoxRow

TextField is a Gtk.Entry-like subclass that is meant to be used in forms where input must be validated before the form can be submitted. It provides feedback to users about the state of input validation and keeps track of its own validation state. By default, input is considered invalid. This widget can also be used in place of a Gtk.Entry for HIG compliance purposes.

Example

  var validated_entry = new He.TextField ();
username_entry.changed.connect (() => {
username_entry.is_valid = username_entry.text == "valid input";
});

If the TextField.from_regex () constructor is used then the entry automatically sets its validity status. A valid regex must be passed to this constructor.

Example

  GLib.Regex? regex = null;
He.TextField only_lower_case_letters_entry;
try {
regex = new Regex ("^[a-z]*$");
only_lower_case_letters_entry = new He.TextField.from_regex (regex);
} catch (Error e) {
critical (e.message);
// Provide a fallback entry here
}


Namespace: He
Package: libhelium-1

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.ListBoxRow
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Gtk.Accessible
All known members inherited from interface Gtk.Actionable
All known members inherited from interface Gtk.Buildable