Class

# DesktopTableColumn

<div class="rst-class">

forsearch

</div>

Table Column

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

The width attributes of a single column of a `DesktopTable</api/user_interface/desktop/desktoptable>`.

An instance is never created by the application: it is handed out by `DesktopTable.ColumnAttributesAt<desktoptable.columnattributesat>` or by iterating `DesktopTable.Columns<desktoptable.columns>`. The object holds no state of its own - it keeps a weak reference to its table and forwards every access to it. Passing <span class="title-ref">DesktopTable.AllColumns</span> (-1) yields an object whose setters apply to every column.

Widths are expressed as a point value ("100"), a percentage ("25%") or a relative share ("*", "2*"). An invalid expression raises an `UnsupportedFormatException</api/exceptions/unsupportedformatexception>`.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                        | Type                               | Read-Only | Shared |
|-------------------------------------------------------------|------------------------------------|-----------|--------|
| `MaxWidthActual<desktoptablecolumn.maxwidthactual>`         | `Integer</api/data_types/integer>` |           |        |
| `MaxWidthExpression<desktoptablecolumn.maxwidthexpression>` | `String</api/data_types/string>`   |           |        |
| `MinWidthActual<desktoptablecolumn.minwidthactual>`         | `Integer</api/data_types/integer>` |           |        |
| `MinWidthExpression<desktoptablecolumn.minwidthexpression>` | `String</api/data_types/string>`   |           |        |
| `UserResizable<desktoptablecolumn.userresizable>`           | `Boolean</api/data_types/boolean>` |           |        |
| `Visible<desktoptablecolumn.visible>`                       | `Boolean</api/data_types/boolean>` |           |        |
| `WidthActual<desktoptablecolumn.widthactual>`               | `Integer</api/data_types/integer>` |           |        |
| `WidthExpression<desktoptablecolumn.widthexpression>`       | `String</api/data_types/string>`   |           |        |

## Property descriptions

<div id="desktoptablecolumn.maxwidthactual">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableColumn.MaxWidthActual

**MaxWidthActual** As `Integer</api/data_types/integer>`

> Resolved maximum width in points. Maximum column width in points. It is the resolved value of `MaxWidthExpression<desktoptablecolumn.maxwidthexpression>`, so a percentage is already turned into points.
>
> This example sets the resolved maximum width in points:
>
> ``` xojo
> Table1.ColumnAttributesAt(1).MaxWidthActual = 0
> ```

<div id="desktoptablecolumn.maxwidthexpression">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableColumn.MaxWidthExpression

**MaxWidthExpression** As `String</api/data_types/string>`

> Maximum width as an expression. Maximum column width as an expression (points, `%` or `*`). It caps the column while the user drags it wider and while a share (`*`) or percentage grows.
>
> This example sets the maximum width as an expression:
>
> ``` xojo
> Table1.ColumnAttributesAt(1).MaxWidthExpression = "MaxWidthExpression"
> ```

<div id="desktoptablecolumn.minwidthactual">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableColumn.MinWidthActual

**MinWidthActual** As `Integer</api/data_types/integer>`

> Resolved minimum width in points. Minimum column width in points. It is the resolved value of `MinWidthExpression<desktoptablecolumn.minwidthexpression>`, so a percentage is already turned into points.
>
> This example sets the resolved minimum width in points:
>
> ``` xojo
> Table1.ColumnAttributesAt(1).MinWidthActual = 0
> ```

<div id="desktoptablecolumn.minwidthexpression">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableColumn.MinWidthExpression

**MinWidthExpression** As `String</api/data_types/string>`

> Minimum width as an expression. Minimum column width as an expression (points, `%` or `*`). It keeps the column from becoming narrower, however the width is computed.
>
> This example sets the minimum width as an expression:
>
> ``` xojo
> Table1.ColumnAttributesAt(1).MinWidthExpression = "MinWidthExpression"
> ```

<div id="desktoptablecolumn.userresizable">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableColumn.UserResizable

**UserResizable** As `Boolean</api/data_types/boolean>`

> Whether the user may drag this column's width. With `False</api/language/false>` the divider next to the column cannot be dragged, even while the table allows resizing.
>
> This example sets whether the user may drag this column's width:
>
> ``` xojo
> Table1.ColumnAttributesAt(1).UserResizable = True
> ```

<div id="desktoptablecolumn.visible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableColumn.Visible

**Visible** As `Boolean</api/data_types/boolean>`

> Whether the column is shown - same as `ColumnVisibleAt`. A hidden column keeps its data, its width expressions and its index. It only takes no space, raises no paint events and cannot be hit, resized, dragged or edited.
>
> ``` xojo
> Table1.ColumnAttributesAt(1).Visible = False
> ```

<div id="desktoptablecolumn.widthactual">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableColumn.WidthActual

**WidthActual** As `Integer</api/data_types/integer>`

> Resolved current width in points. Current column width in points. It is what the layout made of `WidthExpression<desktoptablecolumn.widthexpression>`, bounded by the minimum and maximum. A hidden column reports 0.
>
> This example sets the resolved current width in points:
>
> ``` xojo
> Table1.ColumnAttributesAt(1).WidthActual = 0
> ```

<div id="desktoptablecolumn.widthexpression">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DesktopTableColumn.WidthExpression

**WidthExpression** As `String</api/data_types/string>`

> Current width as an expression. Column width as an expression (points, `%` or `*`).
>
> ``` xojo
> Var col As DesktopTableColumn = Table1.ColumnAttributesAt(1)
>
> col.WidthExpression = "*"
> col.MinWidthActual = 80
> col.MaxWidthActual = 400
> ```

## Compatibility

|                       |         |
|-----------------------|---------|
| **Project Types**     | Desktop |
| **Operating Systems** | All     |

<div class="seealso">

`DesktopTable</api/user_interface/desktop/desktoptable>`

</div>
