# TableViewColumn

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

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

```rust
struct TableViewColumn
```

Defines a column in a [`TableView`](/docs/0.5.0/api/ferroui-controls/struct-tableview/).

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`is_visible_property`](#function-is_visible_property)
- [`header_theme_property`](#function-header_theme_property)
- [`header_template_property`](#function-header_template_property)
- [`header_property`](#function-header_property)
- [`width_property`](#function-width_property)
- [`cell_theme_property`](#function-cell_theme_property)
- [`cell_template_property`](#function-cell_template_property)
- [`binding_property`](#function-binding_property)
- [`can_user_resize_property`](#function-can_user_resize_property)
- [`horizontal_content_alignment_property`](#function-horizontal_content_alignment_property)
- [`table_view_property`](#function-table_view_property)
- [`actual_width_property`](#function-actual_width_property)
- [`can_user_effectively_resize_property`](#function-can_user_effectively_resize_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`is_visible`](#function-is_visible)
- [`set_is_visible`](#function-set_is_visible)
- [`header_theme`](#function-header_theme)
- [`set_header_theme`](#function-set_header_theme)
- [`header_template`](#function-header_template)
- [`set_header_template`](#function-set_header_template)
- [`header`](#function-header)
- [`set_header`](#function-set_header)
- [`width`](#function-width)
- [`set_width`](#function-set_width)
- [`cell_theme`](#function-cell_theme)
- [`set_cell_theme`](#function-set_cell_theme)
- [`cell_template`](#function-cell_template)
- [`set_cell_template`](#function-set_cell_template)
- [`binding`](#function-binding)
- [`set_binding`](#function-set_binding)
- [`can_user_resize`](#function-can_user_resize)
- [`set_can_user_resize`](#function-set_can_user_resize)
- [`horizontal_content_alignment`](#function-horizontal_content_alignment)
- [`set_horizontal_content_alignment`](#function-set_horizontal_content_alignment)
- [`table_view`](#function-table_view)
- [`actual_width`](#function-actual_width)
- [`can_user_effectively_resize`](#function-can_user_effectively_resize)

<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/table_view_column.rs#L27)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### is_visible_property

```rust
fn is_visible_property() -> &'static StyledProperty<bool>
```

Defines the `IsVisible` property.

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

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

### header_theme_property

```rust
fn header_theme_property() -> &'static StyledProperty<Option<Ref<ControlTheme>>>
```

Defines the `HeaderTheme` property.

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

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

### header_template_property

```rust
fn header_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
```

Defines the `HeaderTemplate` property.

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

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

### header_property

```rust
fn header_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Defines the `Header` property.

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

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

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

### cell_theme_property

```rust
fn cell_theme_property() -> &'static StyledProperty<Option<Ref<ControlTheme>>>
```

Defines the `CellTheme` property.

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

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

### cell_template_property

```rust
fn cell_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
```

Defines the `CellTemplate` property.

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

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

### binding_property

```rust
fn binding_property() -> &'static StyledProperty<Option<AssignedBinding>>
```

Defines the `Binding` property.

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

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

### can_user_resize_property

```rust
fn can_user_resize_property() -> &'static StyledProperty<Option<bool>>
```

Defines the `CanUserResize` property.

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

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

### horizontal_content_alignment_property

```rust
fn horizontal_content_alignment_property() -> &'static StyledProperty<HorizontalAlignment>
```

Defines the `HorizontalContentAlignment` property.

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

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

### table_view_property

```rust
fn table_view_property() -> &'static DirectProperty<TableViewColumn, Option<Ref<TableView>>>
```

Defines the `TableView` property.

The column does not own its table view: the value is held weakly
and read as a handle.

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

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

### actual_width_property

```rust
fn actual_width_property() -> &'static DirectProperty<TableViewColumn, f64>
```

Defines the `ActualWidth` property.

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

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

### can_user_effectively_resize_property

```rust
fn can_user_effectively_resize_property() -> &'static DirectProperty<TableViewColumn, bool>
```

Defines the `CanUserEffectivelyResize` property.

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

<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/table_view_column.rs#L156)

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

### new

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



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

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

### is_visible

```rust
fn is_visible(self: &Self) -> bool
```

Gets or sets whether the column is visible. The default is true.

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

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

### set_is_visible

```rust
fn set_is_visible(self: &Self, value: bool)
```



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

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

### header_theme

```rust
fn header_theme(self: &Self) -> Option<Ref<ControlTheme>>
```

Gets or sets the theme to apply to the header. It must target
`TableViewColumnHeader`.

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

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

### set_header_theme

```rust
fn set_header_theme(self: &Self, value: impl Into<Nullable<ControlTheme>>)
```



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

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

### header_template

```rust
fn header_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
```

Gets or sets the data template used to display the header.

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

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

### set_header_template

```rust
fn set_header_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
```



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

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

### header

```rust
fn header(self: &Self) -> Option<BoxedValue>
```

Gets or sets the column header content.

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

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

### set_header

```rust
fn set_header(self: &Self, value: Option<BoxedValue>)
```



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

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

### width

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

Gets or sets the column width. Supports pixel, star (*) and auto
sizing.

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

<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/table_view_column.rs#L212)

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

### cell_theme

```rust
fn cell_theme(self: &Self) -> Option<Ref<ControlTheme>>
```

Gets or sets the theme to apply to the cells. It must target
`TableViewCell`.

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

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

### set_cell_theme

```rust
fn set_cell_theme(self: &Self, value: impl Into<Nullable<ControlTheme>>)
```



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

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

### cell_template

```rust
fn cell_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
```

Gets or sets the data template used to display cell content. When
set, the whole row data item is passed as the template's data
context.

This property takes priority over `binding`.

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

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

### set_cell_template

```rust
fn set_cell_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
```



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

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

### binding

```rust
fn binding(self: &Self) -> Option<AssignedBinding>
```

Gets or sets a binding that retrieves the cell value from the row
data item. Use this for simple property display, such as a binding to
the `Name` property of the items.

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

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

### set_binding

```rust
fn set_binding(self: &Self, value: Option<AssignedBinding>)
```



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

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

### can_user_resize

```rust
fn can_user_resize(self: &Self) -> Option<bool>
```

Gets or sets whether the column can be resized. Set to `None` to use
the value of `TableView::can_user_resize_columns`. The default is
`None`.

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

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

### set_can_user_resize

```rust
fn set_can_user_resize(self: &Self, value: Option<bool>)
```



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

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

### horizontal_content_alignment

```rust
fn horizontal_content_alignment(self: &Self) -> HorizontalAlignment
```

Gets or sets the horizontal alignment of the content within a cell.

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

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

### set_horizontal_content_alignment

```rust
fn set_horizontal_content_alignment(self: &Self, value: HorizontalAlignment)
```



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

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

### table_view

```rust
fn table_view(self: &Self) -> Option<Ref<TableView>>
```

Gets the `TableView` associated with this column.

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

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

### actual_width

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

Gets the actual width of the column, in device independent pixels.
If the column hasn't yet been measured, returns NaN.

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

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

### can_user_effectively_resize

```rust
fn can_user_effectively_resize(self: &Self) -> bool
```

Gets whether the column can be effectively resized. The value of
this property depends on both `can_user_resize`
and `TableView::can_user_resize_columns`.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`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<TableViewColumn>`](/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/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`IHeadered`](/docs/0.5.0/api/ferroui-controls/trait-iheadered/)

## Availability

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