pub struct DropDownBox<'a, F: FnMut(&mut Ui, &str) -> Response, V: AsRef<str>, I: Iterator<Item = V>> { /* private fields */ }
Expand description
Dropdown widget
Implementations§
Source§impl<'a, F: FnMut(&mut Ui, &str) -> Response, V: AsRef<str>, I: Iterator<Item = V>> DropDownBox<'a, F, V, I>
impl<'a, F: FnMut(&mut Ui, &str) -> Response, V: AsRef<str>, I: Iterator<Item = V>> DropDownBox<'a, F, V, I>
Sourcepub fn from_iter(
it: impl IntoIterator<IntoIter = I>,
id_source: impl Hash,
buf: &'a mut String,
display: F,
) -> Self
pub fn from_iter( it: impl IntoIterator<IntoIter = I>, id_source: impl Hash, buf: &'a mut String, display: F, ) -> Self
Creates new dropdown box.
Sourcepub fn hint_text(self, hint_text: impl Into<WidgetText>) -> Self
pub fn hint_text(self, hint_text: impl Into<WidgetText>) -> Self
Add a hint text to the Text Edit
Sourcepub fn filter_by_input(self, filter_by_input: bool) -> Self
pub fn filter_by_input(self, filter_by_input: bool) -> Self
Determine whether to filter box items based on what is in the Text Edit already
Sourcepub fn select_on_focus(self, select_on_focus: bool) -> Self
pub fn select_on_focus(self, select_on_focus: bool) -> Self
Determine whether to select the text when the Text Edit gains focus
Sourcepub fn desired_width(self, desired_width: f32) -> Self
pub fn desired_width(self, desired_width: f32) -> Self
Passes through the desired width value to the underlying Text Edit
Sourcepub fn max_height(self, height: f32) -> Self
pub fn max_height(self, height: f32) -> Self
Set a maximum height limit for the opened popup
Trait Implementations§
Auto Trait Implementations§
impl<'a, F, V, I> Freeze for DropDownBox<'a, F, V, I>
impl<'a, F, V, I> RefUnwindSafe for DropDownBox<'a, F, V, I>where
F: RefUnwindSafe,
I: RefUnwindSafe,
impl<'a, F, V, I> Send for DropDownBox<'a, F, V, I>
impl<'a, F, V, I> Sync for DropDownBox<'a, F, V, I>
impl<'a, F, V, I> Unpin for DropDownBox<'a, F, V, I>
impl<'a, F, V, I> !UnwindSafe for DropDownBox<'a, F, V, I>
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