pub struct MaterialSelect<'a> { /* private fields */ }Implementations§
Source§impl<'a> MaterialSelect<'a>
impl<'a> MaterialSelect<'a>
Sourcepub fn placeholder(self, placeholder: impl Into<String>) -> Self
pub fn placeholder(self, placeholder: impl Into<String>) -> Self
Sourcepub fn variant(self, variant: SelectVariant) -> Self
pub fn variant(self, variant: SelectVariant) -> Self
Sourcepub fn error_text(self, text: impl Into<String>) -> Self
pub fn error_text(self, text: impl Into<String>) -> Self
Sourcepub fn helper_text(self, text: impl Into<String>) -> Self
pub fn helper_text(self, text: impl Into<String>) -> Self
Sourcepub fn leading_icon(self, icon: impl Into<String>) -> Self
pub fn leading_icon(self, icon: impl Into<String>) -> Self
Sourcepub fn trailing_icon(self, icon: impl Into<String>) -> Self
pub fn trailing_icon(self, icon: impl Into<String>) -> Self
Sourcepub fn keep_open_on_select(self, keep_open: bool) -> Self
pub fn keep_open_on_select(self, keep_open: bool) -> Self
Set whether to keep the dropdown open after selecting an option.
§Arguments
keep_open- If true, the dropdown remains open after selection; if false, it closes (default behavior)
§Example
let mut selection = None;
ui.add(MaterialSelect::new(&mut selection)
.keep_open_on_select(true)); // Dropdown stays open after selectionSourcepub fn enable_filter(self, enable: bool) -> Self
pub fn enable_filter(self, enable: bool) -> Self
Enable filtering of options by typing.
§Arguments
enable- If true, allows filtering options by text input
Sourcepub fn enable_search(self, enable: bool) -> Self
pub fn enable_search(self, enable: bool) -> Self
Enable search highlighting while typing.
§Arguments
enable- If true, highlights matching options while typing
Sourcepub fn border_radius(self, radius: f32) -> Self
pub fn border_radius(self, radius: f32) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for MaterialSelect<'a>
impl<'a> RefUnwindSafe for MaterialSelect<'a>
impl<'a> Send for MaterialSelect<'a>
impl<'a> Sync for MaterialSelect<'a>
impl<'a> Unpin for MaterialSelect<'a>
impl<'a> UnsafeUnpin for MaterialSelect<'a>
impl<'a> !UnwindSafe for MaterialSelect<'a>
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
Mutably borrows from an owned value. Read more