Fired after a new column has been added.
![]() | Type | Description | ||
| Column as Column | A Column object that has been added to Columns collection. |
The AddColumn event is fired when a new column is inserted to the Columns collection. Use the Add method to add new columns to the control. Use the AddColumn event to associate extra data to a column. Use the Data property to assign an extra data to a column. The control fires the RemoveColumn event when a column is removed. Use the ColumnAutoResize property to specify whether the visible columns hits the control's client area.
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