# UniformGrid

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

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

```rust
struct UniformGrid
```

A panel which lays out its children in a grid with all cells having the
same size.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`rows_property`](#function-rows_property)
- [`columns_property`](#function-columns_property)
- [`first_column_property`](#function-first_column_property)
- [`row_spacing_property`](#function-row_spacing_property)
- [`column_spacing_property`](#function-column_spacing_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`rows`](#function-rows)
- [`set_rows`](#function-set_rows)
- [`columns`](#function-columns)
- [`set_columns`](#function-set_columns)
- [`first_column`](#function-first_column)
- [`set_first_column`](#function-set_first_column)
- [`row_spacing`](#function-row_spacing)
- [`set_row_spacing`](#function-set_row_spacing)
- [`column_spacing`](#function-column_spacing)
- [`set_column_spacing`](#function-set_column_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/uniform_grid.rs#L21)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### rows_property

```rust
fn rows_property() -> &'static StyledProperty<i32>
```

Defines the `Rows` property.

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

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

### columns_property

```rust
fn columns_property() -> &'static StyledProperty<i32>
```

Defines the `Columns` property.

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

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

### first_column_property

```rust
fn first_column_property() -> &'static StyledProperty<i32>
```

Defines the `FirstColumn` property.

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

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

### row_spacing_property

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

Defines the `RowSpacing` property.

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

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

### column_spacing_property

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

Defines the `ColumnSpacing` property.

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

<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/uniform_grid.rs#L160)

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

### new

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



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

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

### rows

```rust
fn rows(self: &Self) -> i32
```

The number of rows in each column. A value of zero indicates that the
number of rows is computed.

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

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

### set_rows

```rust
fn set_rows(self: &Self, value: i32)
```



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

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

### columns

```rust
fn columns(self: &Self) -> i32
```

The number of columns in each row. A value of zero indicates that the
number of columns is computed.

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

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

### set_columns

```rust
fn set_columns(self: &Self, value: i32)
```



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

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

### first_column

```rust
fn first_column(self: &Self) -> i32
```

The number of columns that are left blank in the first row of the
grid.

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

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

### set_first_column

```rust
fn set_first_column(self: &Self, value: i32)
```



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

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

### row_spacing

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

The spacing between rows.

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

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

### set_row_spacing

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



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

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

### column_spacing

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

The spacing between columns.

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

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

### set_column_spacing

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



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

## 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<UniformGrid>`](/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/).
