Struct winsafe::gui::events::ComboBoxEvents
source · pub struct ComboBoxEvents(/* private fields */);
Available on crate feature
gui
only.Expand description
Exposes combo box control notifications.
These event methods are just proxies to the
WindowEvents
of the parent window, who
is the real responsible for the child event handling.
You cannot directly instantiate this object, it is created internally by the control.
Implementations§
source§impl ComboBoxEvents
impl ComboBoxEvents
sourcepub fn cbn_close_up<F>(&self, func: F)
pub fn cbn_close_up<F>(&self, func: F)
CBN_CLOSEUP
command notification.
sourcepub fn cbn_dbl_clk<F>(&self, func: F)
pub fn cbn_dbl_clk<F>(&self, func: F)
CBN_DBLCLK
command notification.
sourcepub fn cbn_drop_down<F>(&self, func: F)
pub fn cbn_drop_down<F>(&self, func: F)
CBN_DROPDOWN
command notification.
sourcepub fn cbn_edit_change<F>(&self, func: F)
pub fn cbn_edit_change<F>(&self, func: F)
CBN_EDITCHANGE
command notification.
sourcepub fn cbn_edit_update<F>(&self, func: F)
pub fn cbn_edit_update<F>(&self, func: F)
CBN_EDITUPDATE
command notification.
sourcepub fn cbn_err_space<F>(&self, func: F)
pub fn cbn_err_space<F>(&self, func: F)
CBN_ERRSPACE
command notification.
sourcepub fn cbn_kill_focus<F>(&self, func: F)
pub fn cbn_kill_focus<F>(&self, func: F)
CBN_KILLFOCUS
command notification.
sourcepub fn cbn_sel_change<F>(&self, func: F)
pub fn cbn_sel_change<F>(&self, func: F)
CBN_SELCHANGE
command notification.
§Examples
use winsafe::{self as w, prelude::*, gui};
let wnd: gui::WindowMain; // initialized somewhere
let cmb: gui::ComboBox;
let cmb2 = cmb.clone(); // to pass into the closure
cmb.on().cbn_sel_change(
move || -> w::AnyResult<()> {
if let Some(sel_text) = cmb2.items().selected_text() {
println!("New selected text: {}", sel_text);
}
Ok(())
},
);
sourcepub fn cbn_sel_end_cancel<F>(&self, func: F)
pub fn cbn_sel_end_cancel<F>(&self, func: F)
CBN_SELENDCANCEL
command notification.
sourcepub fn cbn_sel_end_ok<F>(&self, func: F)
pub fn cbn_sel_end_ok<F>(&self, func: F)
CBN_SELENDOK
command notification.
sourcepub fn cbn_set_focus<F>(&self, func: F)
pub fn cbn_set_focus<F>(&self, func: F)
CBN_SETFOCUS
command notification.
Trait Implementations§
source§impl GuiNativeControlEvents<ComboBoxEvents> for ComboBox
impl GuiNativeControlEvents<ComboBoxEvents> for ComboBox
source§fn on(&self) -> &ComboBoxEvents
fn on(&self) -> &ComboBoxEvents
Exposes the specific control events. Read more
Auto Trait Implementations§
impl Freeze for ComboBoxEvents
impl !RefUnwindSafe for ComboBoxEvents
impl !Send for ComboBoxEvents
impl !Sync for ComboBoxEvents
impl Unpin for ComboBoxEvents
impl !UnwindSafe for ComboBoxEvents
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