# RadioButtonsPanel

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/primitives/struct-radiobuttonspanel/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct RadioButtonsPanel
```

Lays out the radio buttons of a [`RadioButtons`](/docs/0.5.0/api/ferroui-controls/struct-radiobuttons/) in columns of equal cells as large as the
largest one, filling each column from the top, with as many columns as the available width
and the `MaxColumns` of the group allow (WinUI's `ColumnMajorUniformToLargestGridLayout`).

Deviation (docs/porting/winui-controls.md, Input): WinUI lays the buttons out with a layout
of an `ItemsRepeater`; FerroUI's `RadioButtons` is an items control, and this panel is its
items panel, set by the control theme of the WinUI theme with the spacing of the resources
`RadioButtonsColumnSpacing` and `RadioButtonsRowSpacing`. `MaxColumns` is read from the group
the panel is the items panel of (its templated parent); a panel of another control has one
column.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L28)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`column_spacing_property`](#function-column_spacing_property)
- [`row_spacing_property`](#function-row_spacing_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`column_spacing`](#function-column_spacing)
- [`set_column_spacing`](#function-set_column_spacing)
- [`row_spacing`](#function-row_spacing)
- [`set_row_spacing`](#function-set_row_spacing)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L34)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<RadioButtonsPanel>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L34)

<a id="function-column_spacing_property"></a>

### column_spacing_property

```rust
fn column_spacing_property() -> &'static StyledProperty<f64>
```

Defines the `ColumnSpacing` property: the space between the columns. 0 by default; the
WinUI theme sets `RadioButtonsColumnSpacing` (7).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L90)

<a id="function-row_spacing_property"></a>

### row_spacing_property

```rust
fn row_spacing_property() -> &'static StyledProperty<f64>
```

Defines the `RowSpacing` property: the space between the rows. 0 by default; the WinUI
theme sets `RadioButtonsRowSpacing` (8).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L90)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L123)

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L127)

<a id="function-column_spacing"></a>

### column_spacing

```rust
fn column_spacing(self: &Self) -> f64
```

Gets the space between the columns.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L132)

<a id="function-set_column_spacing"></a>

### set_column_spacing

```rust
fn set_column_spacing(self: &Self, value: f64)
```

Sets the space between the columns.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L137)

<a id="function-row_spacing"></a>

### row_spacing

```rust
fn row_spacing(self: &Self) -> f64
```

Gets the space between the rows.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L142)

<a id="function-set_row_spacing"></a>

### set_row_spacing

```rust
fn set_row_spacing(self: &Self, value: f64)
```

Sets the space between the rows.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/radio_buttons_panel.rs#L147)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`PanelImplExt`](/docs/0.5.0/api/ferroui-controls/trait-panelimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<RadioButtonsPanel>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`PanelImpl`](/docs/0.5.0/api/ferroui-controls/trait-panelimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
