pub struct ComboBox { /* private fields */ }Implementations§
Source§impl ComboBox
impl ComboBox
pub fn new(id_salt: impl Hash, selected_item: Label) -> Self
pub fn label(self, label: impl Into<WidgetText>) -> Self
Sourcepub fn width(self, width: f32) -> Self
pub fn width(self, width: f32) -> Self
Set the exact width of the combo box button. If not set, the width adapts to the content, icon, and minimum width.
Sourcepub fn popup_max_height(self, height: f32) -> Self
pub fn popup_max_height(self, height: f32) -> Self
Set the maximum height of the popup menu.
Default is ui.spacing().combo_height.
pub fn icon( self, icon_fn: impl FnOnce(&Ui, Rect, &WidgetVisuals, bool, AboveOrBelow) + 'static, ) -> Self
Sourcepub fn wrap_mode(self, wrap_mode: TextWrapMode) -> Self
pub fn wrap_mode(self, wrap_mode: TextWrapMode) -> Self
Set the wrap mode for the selected text displayed in the button.
pub fn close_behavior(self, close_behavior: PopupCloseBehavior) -> Self
pub fn show_ui<R>( self, ui: &mut Ui, menu_contents: impl FnOnce(&mut Ui) -> R, ) -> Option<InnerResponse<R>>
Auto Trait Implementations§
impl Freeze for ComboBox
impl !RefUnwindSafe for ComboBox
impl !Send for ComboBox
impl !Sync for ComboBox
impl Unpin for ComboBox
impl !UnwindSafe for ComboBox
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