property Column.Width as Long

Retrieves or sets the column's width.

TypeDescription
Long A long expression that indicates the column's width.

The Width property specifies the width of the column in pixels. Use the Visible property to hide a column. Use the ColumnAutoResize property to specify whether the visible columns should fit the control's client area. Use the Position property to specify the column's position. Use the SingleEdit property to specify whether the control's label displays one or multiple columns. Use the ColumnAutoResize property to fit all visible columns in the control's client area. Use FilterBarDropDownWidth property to specify the width of the drop down filter window.

The following VB sample sets the width for all columns:

Private Sub ComboBox1_AddColumn(ByVal Column As EXCOMBOBOXLibCtl.IColumn)
    Column.Width = 128
End Sub

The following C++ sample sets the width for all columns:

#include "Column.h"
void OnAddColumnCombobox1(LPDISPATCH Column) 
{
	CColumn column( Column );column.m_bAutoRelease = FALSE;
	column.SetWidth( 128 );
}

The following VB.NET sample changes the column's width:

Private Sub AxComboBox1_AddColumn(ByVal sender As Object, ByVal e As AxEXCOMBOBOXLib._IComboBoxEvents_AddColumnEvent) Handles AxComboBox1.AddColumn
    e.column.Width = 128
End Sub

The following C# sample changes the column's width:

private void axComboBox1_AddColumn(object sender, AxEXCOMBOBOXLib._IComboBoxEvents_AddColumnEvent e)
{
	e.column.Width = 128;
}

The following VFP sample changes the column's width:

*** ActiveX Control Event ***
LPARAMETERS column

with column
	.Width = 128
endwith