MaterialTextField
struct · ferroui-themes-material · v0.5.0
struct MaterialTextField
Attached Material text-field decoration. Works on the existing TextBox;
choosing a theme does not replace the editor or its automation peer.
<TextBox material:MaterialTextField.Label="Amount"
material:MaterialTextField.Prefix="$"
material:MaterialTextField.Suffix="USD"
material:MaterialTextField.SupportingText="Before tax"
PlaceholderText="0.00" />
Members
TYPElabel_propertyprefix_propertysuffix_propertyleading_icon_propertytrailing_icon_propertysupporting_text_propertyerror_text_propertyis_error_propertyshow_character_count_propertycharacter_limit_propertyassistive_text_propertycounter_text_propertyautomation_description_propertyget_labelset_labelget_prefixset_prefixget_suffixset_suffixget_leading_iconset_leading_iconget_trailing_iconset_trailing_iconget_supporting_textset_supporting_textget_error_textset_error_textget_is_errorset_is_errorget_show_character_countset_show_character_countget_character_limitset_character_limitget_assistive_textget_counter_textget_automation_description
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this type.
label_property
fn label_property() -> &'static AttachedProperty<Option<String>>
A label independent of the editor's placeholder. Empty labels are omitted.
prefix_property
fn prefix_property() -> &'static AttachedProperty<Option<String>>
Noneditable text before the editable value, with the native 2dp gap.
suffix_property
fn suffix_property() -> &'static AttachedProperty<Option<String>>
Noneditable text after the editable value, with the native 2dp gap.
leading_icon_property
fn leading_icon_property() -> &'static AttachedProperty<Option<BoxedValue>>
Leading content, centered in a minimum 48dp slot. Icons normally measure 24dp. Use a real button as content when the icon performs an action.
trailing_icon_property
fn trailing_icon_property() -> &'static AttachedProperty<Option<BoxedValue>>
Trailing content, centered in a minimum 48dp slot. Interactive content retains its own keyboard and automation contracts.
supporting_text_property
fn supporting_text_property() -> &'static AttachedProperty<Option<String>>
Assistance displayed 4dp below the painted field, outside its container.
error_text_property
fn error_text_property() -> &'static AttachedProperty<Option<String>>
An application validation message. A nonempty message also activates the error appearance; clearing it restores the supporting text.
is_error_property
fn is_error_property() -> &'static AttachedProperty<bool>
Activates error appearance without changing FerroUI's validation errors.
Supply ErrorText for a specific, localized accessibility description.
show_character_count_property
fn show_character_count_property() -> &'static AttachedProperty<bool>
Displays the live UTF-16 count, consistent with TextBox positions and MaxLength.
character_limit_property
fn character_limit_property() -> &'static AttachedProperty<i32>
Advisory UTF-16 limit. Exceeding it marks the field and counter as errors,
without truncating input or interfering with composition/undo. Zero uses
TextBox.MaxLength, or shows an unbounded count when MaxLength is also zero.
assistive_text_property
fn assistive_text_property() -> &'static AttachedProperty<Option<String>>
Computed message for the template. Applications should set SupportingText or ErrorText instead of writing this output property.
counter_text_property
fn counter_text_property() -> &'static AttachedProperty<Option<String>>
Computed counter for the template; do not set directly.
automation_description_property
fn automation_description_property() -> &'static AttachedProperty<Option<String>>
Computed assistance/error/counter description used as the theme's default AutomationProperties.HelpText. An explicit application value takes priority.
get_label
fn get_label(field: &TextBox) -> Option<String>
set_label
fn set_label(field: &TextBox, value: Option<&str>)
get_prefix
fn get_prefix(field: &TextBox) -> Option<String>
set_prefix
fn set_prefix(field: &TextBox, value: Option<&str>)
get_suffix
fn get_suffix(field: &TextBox) -> Option<String>
set_suffix
fn set_suffix(field: &TextBox, value: Option<&str>)
get_leading_icon
fn get_leading_icon(field: &TextBox) -> Option<BoxedValue>
set_leading_icon
fn set_leading_icon(field: &TextBox, value: Option<BoxedValue>)
get_trailing_icon
fn get_trailing_icon(field: &TextBox) -> Option<BoxedValue>
set_trailing_icon
fn set_trailing_icon(field: &TextBox, value: Option<BoxedValue>)
get_supporting_text
fn get_supporting_text(field: &TextBox) -> Option<String>
set_supporting_text
fn set_supporting_text(field: &TextBox, value: Option<&str>)
get_error_text
fn get_error_text(field: &TextBox) -> Option<String>
set_error_text
fn set_error_text(field: &TextBox, value: Option<&str>)
get_is_error
fn get_is_error(field: &TextBox) -> bool
set_is_error
fn set_is_error(field: &TextBox, value: bool)
get_show_character_count
fn get_show_character_count(field: &TextBox) -> bool
set_show_character_count
fn set_show_character_count(field: &TextBox, value: bool)
get_character_limit
fn get_character_limit(field: &TextBox) -> i32
set_character_limit
fn set_character_limit(field: &TextBox, value: i32)
get_assistive_text
fn get_assistive_text(field: &TextBox) -> Option<String>
get_counter_text
fn get_counter_text(field: &TextBox) -> Option<String>
get_automation_description
fn get_automation_description(field: &TextBox) -> Option<String>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherCastableFrom<ST, Uninit, Uninit>CastableFrom<ST, Initialized, Initialized>Read<Exclusive, BecauseExclusive>StaticType
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.