Struct winsafe::gui::RadioGroup[][src]

pub struct RadioGroup(_);
Expand description

A group of native RadioButton controls.

Implementations

Instantiates a new RadioGroup object, each RadioButton to be created on the parent window with HWND::CreateWindowEx.

Panics

Panics if no options are passed.

Instantiates a new RadioGroup object, to be loaded from a dialog resource with HWND::GetDlgItem.

Panics

Panics if no control IDs are passed.

Exposes the radio group events.

These event methods are just proxies to the WindowEvents of the parent window, who is the real responsible for the child event handling.

Panics

Panics if the control or the parent window are already created. Events must be set before control and parent window creation.

Returns an iterator over the internal RadioButton slice.

Example

Changing the text of all radio buttons to "One":

use winsafe::gui::RadioGroup;

let radio_group: RadioGroup; // initialized somewhere

for single_radio in me.rads.iter() {
    single_radio.hwnd().SetWindowText("One")?;
}

Returns the RadioButton controls as a Vec of Child.

Returns the currently checked RadioButton of this group, if any.

Returns the index of the currently selected RadioButton of this group, if any.

Returns the number of RadioButton controls in this group.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.