pub struct ComboBox { /* private fields */ }Available on crate feature
winio only.Expand description
A simple combo box.
Implementations§
Source§impl ComboBox
impl ComboBox
Sourcepub fn is_editable(&self) -> Result<bool, Error>
pub fn is_editable(&self) -> Result<bool, Error>
If the combo box is editable.
Sourcepub fn set(&mut self, i: usize, s: impl AsRef<str>) -> Result<(), Error>
pub fn set(&mut self, i: usize, s: impl AsRef<str>) -> Result<(), Error>
Set the item by index.
Sourcepub fn insert(&mut self, i: usize, s: impl AsRef<str>) -> Result<(), Error>
pub fn insert(&mut self, i: usize, s: impl AsRef<str>) -> Result<(), Error>
Insert an item by index.
Trait Implementations§
Source§impl AsWidget for ComboBox
impl AsWidget for ComboBox
Source§fn as_widget(&self) -> BorrowedWidget<'_>
fn as_widget(&self) -> BorrowedWidget<'_>
Get the widget handle.
Source§impl Component for ComboBox
impl Component for ComboBox
Source§type Event = ComboBoxEvent
type Event = ComboBoxEvent
The output event type to the parent.
Source§type Init<'a> = BorrowedContainer<'a>
type Init<'a> = BorrowedContainer<'a>
Initial parameter type.
Source§type Message = ComboBoxMessage
type Message = ComboBoxMessage
The input message type to update.
Source§async fn init(
init: <ComboBox as Component>::Init<'_>,
_sender: &ComponentSender<ComboBox>,
) -> Result<ComboBox, Error>
async fn init( init: <ComboBox as Component>::Init<'_>, _sender: &ComponentSender<ComboBox>, ) -> Result<ComboBox, Error>
Create the initial component.
Source§async fn update(
&mut self,
message: <ComboBox as Component>::Message,
_sender: &ComponentSender<ComboBox>,
) -> Result<bool, Error>
async fn update( &mut self, message: <ComboBox as Component>::Message, _sender: &ComponentSender<ComboBox>, ) -> Result<bool, Error>
Respond to the message. Return true if need render.
Source§fn render(&mut self, sender: &ComponentSender<Self>) -> Result<(), Self::Error>
fn render(&mut self, sender: &ComponentSender<Self>) -> Result<(), Self::Error>
Render the widgets.
Source§impl Layoutable for ComboBox
impl Layoutable for ComboBox
Source§impl TextWidget for ComboBox
impl TextWidget for ComboBox
Auto Trait Implementations§
impl Freeze for ComboBox
impl RefUnwindSafe for ComboBox
impl !Send for ComboBox
impl !Sync for ComboBox
impl Unpin for ComboBox
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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