event EditChange (ColIndex as Long)

Fired when the user has taken an action that may have altered text in an edit control.

 TypeDescription 
   ColIndex as Long A long expression that indicates the index of the edit control that's altered.  

The EditChange event notifies your application that the user alters the text of one of the control's edit labels. The control supports single or multiple edit controls in the label area. Use the SingleEdit property to specify that a single edit control is used. Use the EditText property to determine the text of the edit control. Use the KeyDown event to notify your application that the user presses a key. Use the KeyUp event to notify your application that the user releases a key. If the control's Style property is DropDownList, the EditChange event is never fired. Use the AutoComplete property to allow typing values that are not in the column. Use the SelectionChanged event to notify your application that the user changes the selected item.  

The following VB sample prints the text while editing: 

Private Sub ComboBox1_EditChange(ByVal ColIndex As Long)
    Debug.Print ComboBox1.EditText(ColIndex)
End Sub

The following C++ sample prints the text while editing: 

void OnEditChangeCombobox1(long ColIndex) 
{
	OutputDebugString( m_combobox.GetEditText( COleVariant( ColIndex ) ) );
}

The following VB.NET sample prints the text while editing: 

Private Sub AxComboBox1_EditChange(ByVal sender As Object, ByVal e As AxEXCOMBOBOXLib._IComboBoxEvents_EditChangeEvent) Handles AxComboBox1.EditChange
    With AxComboBox1
        Debug.WriteLine(.get_EditText(e.colIndex))
    End With
End Sub

The following C# sample prints the text while editing: 

private void axComboBox1_EditChange(object sender, AxEXCOMBOBOXLib._IComboBoxEvents_EditChangeEvent e)
{
	System.Diagnostics.Debug.WriteLine(axComboBox1.get_EditText(e.colIndex));
}

The following VFP sample prints the text while editing: 

*** ActiveX Control Event ***
LPARAMETERS colindex

with thisform.ComboBox1
	wait window nowait .EditText(colindex)
endwith



Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.