Type | Description | |||
Cell as HCELL | A long expression that indicates the handle of the cell to change its state is about to be changed. | |||
NewState as Long | A long expression that specifies the new state of the cell ( 0- unchecked, 1 - checked, 2 - partial checked ) |
The control fires the CellStateChanging event just before cell's state is about to be changed. For instance, you can prevent changing the cell's state, by calling the NewState = Items.CellState(,Cell). A cell that contains a radio button or a check box button fires the CellStateChanged event when its state is changed. Use the CellState property to change the cell's state. Use the CellHasRadioButton or CellHasCheckBox property to enable radio or check box button into a cell. Use the Def property to assign check-boxes / radio-buttons for all cells in the column. Use the CellImage property to display an icon in the cell. Use the CellImages property to display multiple icons in the same cell. Use the PartialCheck property to enable partial check feature ( check boxes with three states: partial, checked and unchecked ). Use the CellChecked property to determine the handle of the cell that's checked in a radio group. Use the CellRadioGroup property to radio group cells. We would not recommend changing the CellState property during the CellStateChanging event, to prevent recursive calls, instead you can change the NewState parameter which is passed by reference.
Once the user clicks a check-box, radio-button, the control fires the following events:
CellStateChanging event, where the NewState parameter indicates the new state of the cell's checkbox / radio-button.
CellStateChanged event notifies your application that the cell's check-box or radio-button has been changed. The CellState property determines the check-box/radio-button state of the cell.
Private Sub ComboBox1_CellStateChanging(ByVal Cell As EXCOMBOBOXLibCtl.HCELL, NewState As Long) With ComboBox1 If (.ReadOnly) Then With .Items NewState = .CellState(, Cell) End With End If End With End Sub
Syntax for CellStateChanging event, /NET version, on:
private void CellStateChanging(object sender,int Cell,ref int NewState) { } Private Sub CellStateChanging(ByVal sender As System.Object,ByVal Cell As Integer,ByRef NewState As Integer) Handles CellStateChanging End Sub |
private void CellStateChanging(object sender, AxEXCOMBOBOXLib._IComboBoxEvents_CellStateChangingEvent e) { } void OnCellStateChanging(long Cell,long FAR* NewState) { } void __fastcall CellStateChanging(TObject *Sender,Extreelib_tlb::HCELL Cell,long * NewState) { } procedure CellStateChanging(ASender: TObject; Cell: HCELL;var NewState : Integer); begin end; procedure CellStateChanging(sender: System.Object; e: AxEXCOMBOBOXLib._IComboBoxEvents_CellStateChangingEvent); begin end; begin event CellStateChanging(long Cell,long NewState) end event CellStateChanging Private Sub CellStateChanging(ByVal sender As System.Object, ByVal e As AxEXCOMBOBOXLib._IComboBoxEvents_CellStateChangingEvent) Handles CellStateChanging End Sub Private Sub CellStateChanging(ByVal Cell As EXCOMBOBOXLibCtl.HCELL,NewState As Long) End Sub Private Sub CellStateChanging(ByVal Cell As Long,NewState As Long) End Sub LPARAMETERS Cell,NewState PROCEDURE OnCellStateChanging(oComboBox,Cell,NewState) RETURN |
<SCRIPT EVENT="CellStateChanging(Cell,NewState)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function CellStateChanging(Cell,NewState) End Function </SCRIPT> Procedure OnComCellStateChanging HCELL llCell Integer llNewState Forward Send OnComCellStateChanging llCell llNewState End_Procedure METHOD OCX_CellStateChanging(Cell,NewState) CLASS MainDialog RETURN NIL void onEvent_CellStateChanging(int _Cell,COMVariant /*long*/ _NewState) { } function CellStateChanging as v (Cell as OLE::Exontrol.ComboBox.1::HCELL,NewState as N) end function function nativeObject_CellStateChanging(Cell,NewState) return |