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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.