Fired after the user clicks on column's header.
![]() | Type | Description | ||
| Column as Column | A Column object that specifies the column being clicked. |
The ColumnClick event is fired when the user clicks the column's header. By default, the control sorts the column if the user clicks the column's header. Use the SortChildren property to sort the list by a column. Use the ItemFromPoint property to access the item from point. Use the SortOnClick property to disable sorting columns by clicking the control's header bar. Use the HeaderVisible property to specify whether the control's header bar is visible or hidden. Use the Add method to add new columns to the control.
The following VB sample prints the caption of the column being clicked:
Private Sub ComboBox1_ColumnClick(ByVal Column As EXCOMBOBOXLibCtl.IColumn)
Debug.Print Column.Caption
End Sub
The following C++ sample prints the caption of the column being clicked:
#include "Column.h"
void OnColumnClickCombobox1(LPDISPATCH Column)
{
CColumn column( Column );
column.m_bAutoRelease = FALSE;
OutputDebugString( column.GetCaption() );
}
The following VB.NET sample prints the caption of the column being clicked:
Private Sub AxComboBox1_ColumnClick(ByVal sender As Object, ByVal e As AxEXCOMBOBOXLib._IComboBoxEvents_ColumnClickEvent) Handles AxComboBox1.ColumnClick
Debug.WriteLine(e.column.Caption)
End Sub
The following C# sample prints the caption of the column being clicked:
private void axComboBox1_ColumnClick(object sender, AxEXCOMBOBOXLib._IComboBoxEvents_ColumnClickEvent e)
{
System.Diagnostics.Debug.WriteLine(e.column.Caption );
}
The following VFP sample prints the caption of the column being clicked:
*** ActiveX Control Event *** LPARAMETERS column with column wait window nowait .Caption endwith