# ColumnDefinition

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

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

```rust
struct ColumnDefinition
```

Holds a column definition for a `Grid`.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`max_width_property`](#function-max_width_property)
- [`min_width_property`](#function-min_width_property)
- [`width_property`](#function-width_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`with_value`](#function-with_value)
- [`with_width`](#function-with_width)
- [`actual_width`](#function-actual_width)
- [`max_width`](#function-max_width)
- [`set_max_width`](#function-set_max_width)
- [`min_width`](#function-min_width)
- [`set_min_width`](#function-set_min_width)
- [`width`](#function-width)
- [`set_width`](#function-set_width)

<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/column_definition.rs#L13)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L13)

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

### max_width_property

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

Defines the `MaxWidth` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L32)

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

### min_width_property

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

Defines the `MinWidth` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L32)

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

### width_property

```rust
fn width_property() -> &'static StyledProperty<GridLength>
```

Defines the `Width` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L32)

<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/column_definition.rs#L69)

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

### new

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

Creates a column definition.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L76)

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

### with_value

```rust
fn with_value(value: f64, type_: GridUnitType) -> Ref<Self>
```

Creates a column definition with the given width value and unit.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L81)

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

### with_width

```rust
fn with_width(width: GridLength) -> Ref<Self>
```

Creates a column definition with the given width.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L86)

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

### actual_width

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

The actual calculated width of the column.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L93)

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

### max_width

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

The maximum width of the column in DIPs.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L101)

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

### set_max_width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L105)

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

### min_width

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

The minimum width of the column in DIPs.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L110)

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

### set_min_width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L114)

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

### width

```rust
fn width(self: &Self) -> GridLength
```

The width of the column.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/column_definition.rs#L119)

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

### set_width

```rust
fn set_width(self: &Self, value: GridLength)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`DefinitionBaseImplExt`](/docs/0.5.0/api/ferroui-controls/trait-definitionbaseimplext/)
- `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`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<ColumnDefinition>`](/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/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`DefinitionBaseImpl`](/docs/0.5.0/api/ferroui-controls/trait-definitionbaseimpl/)

## Availability

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