pub struct TextEntry<'ui> { /* private fields */ }Expand description
A box in which a single line of text is displayed.
Implementations§
source§impl<'ui> TextEntry<'ui>
impl<'ui> TextEntry<'ui>
sourcepub fn text_as_ptr(&self) -> *mut c_char
pub fn text_as_ptr(&self) -> *mut c_char
Like text but returns an ASCII byte string.
sourcepub fn set_text(&self, text: impl Into<Vec<u8>>) -> Result<(), Error>
pub fn set_text(&self, text: impl Into<Vec<u8>>) -> Result<(), Error>
Sets the text displayed in this entry.
sourcepub fn on_changed<F>(&'ui self, f: F)where
F: 'ui + FnMut(),
pub fn on_changed<F>(&'ui self, f: F)where F: 'ui + FnMut(),
Sets a callback for when the text within this entry changes.
This callback is unset by default. This is not activated when set_text
is called.
sourcepub fn is_read_only(&self) -> bool
pub fn is_read_only(&self) -> bool
Determines if this entry is read-only.
sourcepub fn set_read_only(&self, value: bool)
pub fn set_read_only(&self, value: bool)
Sets whether or not this entry is read-only.
Methods from Deref<Target = Control>§
sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Determines if this control is visible.
Controls are visible by default except for Windows, which are invisible
by default.
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Determines if this control responds to user interaction.
Controls are enabled by default.
sourcepub fn is_enabled_to_user(&self) -> bool
pub fn is_enabled_to_user(&self) -> bool
Determines if this control, and all of its parent controls, are enabled.
If this control is not a child of a parent control, then this function is equivalent to
is_enabled.
sourcepub fn native_handle(&self) -> *mut c_void
pub fn native_handle(&self) -> *mut c_void
A handle to the underlying OS object.