pub struct BasicTextFieldOptions {
pub text_style: TextStyle,
pub cursor_color: Color,
pub line_limits: TextFieldLineLimits,
pub show_keyboard_on_focus: bool,
pub keyboard_options: KeyboardOptions,
pub on_keyboard_action: Option<KeyboardActionHandler>,
pub input_transformation: Option<InputTransformation>,
pub output_transformation: Option<OutputTransformation>,
}Expand description
Options for customizing BasicTextField appearance and behavior.
Fields§
§text_style: TextStyleText style
cursor_color: ColorCursor color
line_limits: TextFieldLineLimitsLine limits: SingleLine or MultiLine with optional min/max
show_keyboard_on_focus: boolWhether gaining focus opens the software keyboard. Defaults to true.
When false, programmatic and keyboard-navigation focus leave the
software keyboard hidden. A pointer tap still explicitly opens it.
Changing this to true while focused also requests the keyboard.
Changing it to false preserves an already visible keyboard.
keyboard_options: KeyboardOptionsThe software keyboard the field asks for and its action key.
on_keyboard_action: Option<KeyboardActionHandler>Runs the keyboard’s action key, and Enter in a single-line field. Without it the action’s default runs: Next and Previous move focus, Done hides the software keyboard.
input_transformation: Option<InputTransformation>Changes or rejects each edit the person makes, such as a length limit or a filter on what can be typed.
output_transformation: Option<OutputTransformation>Changes how the field shows its text without changing the text.
Make it once, with remember: the field lays out again whenever it
gets a different one.
Trait Implementations§
Source§impl Clone for BasicTextFieldOptions
impl Clone for BasicTextFieldOptions
Source§impl Debug for BasicTextFieldOptions
impl Debug for BasicTextFieldOptions
Source§impl Default for BasicTextFieldOptions
impl Default for BasicTextFieldOptions
Source§impl PartialEq for BasicTextFieldOptions
impl PartialEq for BasicTextFieldOptions
impl StructuralPartialEq for BasicTextFieldOptions
Auto Trait Implementations§
impl !RefUnwindSafe for BasicTextFieldOptions
impl !Send for BasicTextFieldOptions
impl !Sync for BasicTextFieldOptions
impl !UnwindSafe for BasicTextFieldOptions
impl Freeze for BasicTextFieldOptions
impl Unpin for BasicTextFieldOptions
impl UnsafeUnpin for BasicTextFieldOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more