# ColumnStyle

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (3.2.0.0)

* [TableLayoutStyle](https://docs.wisej.com/api/v3.2/wisej.web/containers/tablelayoutpanel/wisej.web.tablelayoutstyle)
  * [ColumnStyle](https://docs.wisej.com/api/v3.2/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle)

Represents the look and feel of a column in a table layout.

{% tabs %}
{% tab title="C#" %}

```csharp
public class ColumnStyle : TableLayoutStyle
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class ColumnStyle
    Inherits TableLayoutStyle
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)ColumnStyle()

Initializes an instance of the [ColumnStyle](https://docs.wisej.com/api/v3.2/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) class to its default state.

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)ColumnStyle(style)

Initializes and instance of the [ColumnStyle](https://docs.wisej.com/api/v3.2/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) class to its default state.

| Name      | Type                                                                                  | Description                |
| --------- | ------------------------------------------------------------------------------------- | -------------------------- |
| **style** | [ColumnStyle](https://docs.microsoft.com/dotnet/api/system.windows.forms.columnstyle) | Underlying style instance. |

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)ColumnStyle(sizeType)

Initializes an instance of the [ColumnStyle](https://docs.wisej.com/api/v3.2/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) class using the supplied [SizeType](https://docs.wisej.com/api/v3.2/wisej.web/enumerations/wisej.web.sizetype) value.

| Name         | Type                                                                                  | Description                                                                                                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **sizeType** | [SizeType](https://docs.wisej.com/api/v3.2/wisej.web/enumerations/wisej.web.sizetype) | A [SizeType](https://docs.wisej.com/api/v3.2/wisej.web/containers/wisej.web.tablelayoutstyle#sizetype) indicating how the column should be should be sized relative to its containing table. |

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)ColumnStyle(sizeType, width)

Initializes and instance of the [ColumnStyle](https://docs.wisej.com/api/v3.2/wisej.web/containers/tablelayoutpanel/wisej.web.columnstyle) class using the supplied [SizeType](https://docs.wisej.com/api/v3.2/wisej.web/enumerations/wisej.web.sizetype) and width values.

| Name         | Type                                                                                  | Description                                                                                                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **sizeType** | [SizeType](https://docs.wisej.com/api/v3.2/wisej.web/enumerations/wisej.web.sizetype) | A [SizeType](https://docs.wisej.com/api/v3.2/wisej.web/containers/wisej.web.tablelayoutstyle#sizetype) indicating how the column should be should be sized relative to its containing table. |
| **width**    | [Single](https://docs.microsoft.com/dotnet/api/system.single)                         | The preferred width, in pixels or percentage, depending on the *sizeType* parameter.                                                                                                         |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) *width* is less than 0.

## Properties

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Width

[Single](https://docs.microsoft.com/dotnet/api/system.single): Returns or sets the width value for a column.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The value is less than 0 when setting this property.
