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 }
Content:
Properties:
public Text entry { get ; }
public bool is_outline { get ; set ; }
public bool is_search { get ; set ; }
public bool is_valid { get ; set ; }
Whether or not text is considered valid input.
public int max_length { get ; set ; }
public int min_length { get ; set ; }
The minimum length to start validating.
public bool needs_validation { get ; set ; }
Whether or not text needs to be validated.
public string ? placeholder_text { get ; set ; }
public string ? prefix_icon { get ; set ; }
public Regex regex { get ; set construct ; }
The regular expression used for validation.
public string ? suffix_icon { get ; set ; }
public string ? support_text { get ; set ; }
public string ? text { get ; set ; }
public bool visibility { get ; set ; }
Creation methods:
Methods:
Inherited Members:
All known members inherited from class Gtk.ListBoxRow
activatable
activate
changed
child
get_activatable
get_child
get_header
get_index
get_selectable
is_selected
selectable
set_activatable
set_child
set_header
set_selectable
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface Gtk.Accessible
accessible_role
announce
get_accessible_parent
get_accessible_role
get_at_context
get_bounds
get_first_accessible_child
get_next_accessible_sibling
get_platform_state
reset_property
reset_relation
reset_state
set_accessible_parent
update_next_accessible_sibling
update_property
update_property_value
update_relation
update_relation_value
update_state
update_state_value
All known members inherited from interface Gtk.Actionable
action_name
action_target
get_action_name
get_action_target_value
set_action_name
set_action_target
set_action_target_value
set_detailed_action_name
All known members inherited from interface Gtk.Buildable
add_child
custom_finished
custom_tag_end
custom_tag_start
get_buildable_id
get_id
get_internal_child
parser_finished
set_buildable_property
set_id