Struct native_windows_gui::NumberSelect [−][src]
pub struct NumberSelect { pub handle: ControlHandle, // some fields omitted }
Expand description
A NumberSelect control is a pair of arrow buttons that the user can click to increment or decrement a value. NumberSelect is implemented as a custom control because the one provided by winapi really sucks.
Requires the number-select
feature.
Builder parameters:
parent
: Required. The number select parent container.value
: The default value of the number selectsize
: The number select size.position
: The number select position.enabled
: If the number select can be used by the user. It also has a grayed out look if disabled.flags
: A combination of the NumberSelectFlags values.font
: The font used for the number select text
Control events:
MousePress(_)
: Generic mouse press events on the buttonOnMouseMove
: Generic mouse mouse event
use native_windows_gui as nwg; fn build_number_select(num_select: &mut nwg::NumberSelect, window: &nwg::Window, font: &nwg::Font) { nwg::NumberSelect::builder() .font(Some(font)) .parent(window) .build(num_select); }
Fields
handle: ControlHandle
Implementations
Returns inner data specifying the possible input of a number select See NumberSelectData for the possible values
Sets the inner data specifying the possible input of a number select. Also update the value display. See NumberSelectData for the possible values
Returns true if the control user can interact with the control, return false otherwise
Enable or disable the control
Returns true if the control is visible to the user. Will return true even if the control is outside of the parent client view (ex: at the position (10000, 10000))
Show or hide the control to the user
Sets the position of the control in the parent window
Winapi class name used during control creation
Winapi flags required by the control
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for NumberSelect
impl !Send for NumberSelect
impl !Sync for NumberSelect
impl Unpin for NumberSelect
impl !UnwindSafe for NumberSelect