pub struct RadioButton(/* private fields */);
gui
only.Expand description
Native radio button control.
You cannot directly instantiate this object, you must use
RadioGroup
.
Implementations§
Source§impl RadioButton
impl RadioButton
Sourcepub fn on_subclass(&self) -> &WindowEvents
pub fn on_subclass(&self) -> &WindowEvents
Exposes the subclass events. If at least one event exists, the control will be subclassed.
Note: Subclassing may impact performance, use with care.
§Panics
Panics if the control or the parent window are already created. Events must be set before control and parent window creation.
Sourcepub fn on(&self) -> &ButtonEvents
pub fn on(&self) -> &ButtonEvents
Exposes the specific control events.
§Panics
Panics if the control is already created. Events must be set before control creation.
Source§impl RadioButton
impl RadioButton
Sourcepub fn is_selected(&self) -> bool
pub fn is_selected(&self) -> bool
Tells if this radio button is the currently selected one by sending a
bm::GetCheck
message.
Sourcepub fn select(&self, selected: bool)
pub fn select(&self, selected: bool)
Sets the this radio button as the currently selected one by sending a
bm::SetCheck
message.
Sourcepub fn select_and_trigger(&self, selected: bool) -> SysResult<()>
pub fn select_and_trigger(&self, selected: bool) -> SysResult<()>
Sets the this radio button as the currently selected one by sending a
bm::SetCheck
message, then sends a
wm::Command
message to the parent, so it
can handle the event.
Sourcepub fn set_text_and_resize(&self, text: &str) -> SysResult<()>
pub fn set_text_and_resize(&self, text: &str) -> SysResult<()>
Calls HWND::SetWindowText
to set the
text and resizes the control to exactly fit it.
Sourcepub fn trigger_click(&self)
pub fn trigger_click(&self)
Fires the click event for the button by sending a
bm::Click
message.