System.Windows.Forms.ColumnHeader.Width Property

Gets or sets the width of the column.

Syntax

[System.ComponentModel.Localizable(true)]
[System.ComponentModel.DefaultValue(60)]
public int Width { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property enables you to set the ColumnHeader.Width of the System.Windows.Forms.ColumnHeader. The System.Windows.Forms.ColumnHeader can be set to adjust at run time to the column contents or heading. To adjust the width of the longest item in the column, set the ColumnHeader.Width property to -1. To autosize to the width of the column heading, set the ColumnHeader.Width property to -2.

Note:

Unexpected behavior can result when the combined width of all columns exceeds 32,768 pixels.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0