Struct winsafe::gui::events::EditEvents [−][src]
pub struct EditEvents { /* fields omitted */ }
Expand description
Exposes edit 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
EN_ALIGN_LTR_EC
command notification.
Sent when the user has changed the edit control direction to left-to-right.
EN_ALIGN_LTR_EC
command notification.
Sent when the user has changed the edit control direction to right-to-left.
EN_CHANGE
command notification.
Sent when the user has taken an action that may have altered text in
an edit control. Unlike the
EN_UPDATE
notification code, this notification code is sent after the system
updates the screen.
Examples
use winsafe::{gui, BoxResult};
let txt: gui::Edit; // initialized somewhere
txt.on().en_change({
let txt = txt.clone(); // pass into the closure
move || -> BoxResult<()> {
println!("Text: {}", btn.hwnd().GetWindowText()?);
Ok(())
}
});
EN_ERRSPACE
command notification.
Sent when an edit control cannot allocate enough memory to meet a specific request.
EN_HSCROLL
command notification.
Sent when the user clicks an edit control’s horizontal scroll bar. Notified before the screen is updated.
EN_KILLFOCUS
command notification.
Sent when an edit control loses the keyboard focus.
EN_MAXTEXT
command notification.
Sent when the current text insertion has exceeded the specified number of characters for the edit control. The text insertion has been truncated.
This notification code is also sent when an edit control does not
have the ES_AUTOHSCROLL
style and
the number of characters to be inserted would exceed the width of
the edit control.
This notification code is also sent when an edit control does not
have the ES_AUTOVSCROLL
style and
the total number of lines resulting from a text insertion would
exceed the height of the edit control.
EN_SETFOCUS
command notification.
Sent when an edit control receives the keyboard focus.
EN_UPDATE
command notification.
Sent when an edit control is about to redraw itself. This notification code is sent after the control has formatted the text, but before it displays the text. This makes it possible to resize the edit control window, if necessary.
EN_VSCROLL
command notification.
Sent when the user clicks an edit control’s vertical scroll bar or when the user scrolls the mouse wheel over the edit control. Notified before the screen is updated.