event UserEditorClose (Object as Object, Node as Node)
Fired the user editor is about to be opened.

 TypeDescription 
   Object as Object An object created by UserEditor property  
   Node as Node A Node object where the ActiveX editor is closed.  
Use the UserEditorClose event to notify your application when the user editor is hidden. The control fires UserEditorOleEvent event each time when a an user editor object fires an event. Use the Add method and UserEditorType type to add an ActiveX editor to the control. Use the UserEditor method to create an ActiveX editor. Use the UserEditorObject property to get the ActiveX editor created by the UserEditor method. The UserEditorOpen event is fired when the control shows an ActiveX editor. 

The following VB sample changes the node's Value property when the user editor is closed ( in this case we used the Exontrol's ExComboBox control ):

Private Sub XMLGrid1_UserEditorClose(ByVal Object As Object, ByVal Node As EXMLGRIDLibCtl.INode)
On Error Resume Next
    With Object.Items
        Node.Value = .Select(0)
    End With
End Sub

The following C++ sample changes the node's Value property when the user editor is closed ( in this case we have used the Exontrol's ExComboBox component ):

#import <excombobox.dll>
void OnUserEditorCloseXmlgrid1(LPDISPATCH Object, LPDISPATCH Node) 
{
	COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR;
	CNode node( Node ); node.m_bAutoRelease = FALSE;
	EXCOMBOBOXLib::IComboBoxPtr spComboBox = Object;
	if ( spComboBox != NULL )
	{
		COleVariant vtValue;
		if ( SUCCEEDED( spComboBox->get_Select( COleVariant( (long)0 ), &vtValue  ) ) )
			node.SetValue( vtValue );
	}
}

The sample assumes that the Object parameter holds an ExComboBox control. We need to call the #import <excombobox.dll> in order to include definitions for objects and types in the ExComboBox control. The #import <excombobox.dll> creates EXCOMBOBOXLib namespace that includes all definitions for objects and types that the ExComboBox control exports.  

The following VB.NET sample changes the node's Value property when the user editor is closed ( in this case we have used the Exontrol's ExComboBox component ):

Private Sub AxXMLGrid1_UserEditorClose(ByVal sender As Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_UserEditorCloseEvent) Handles AxXMLGrid1.UserEditorClose
    On Error Resume Next
    With e.object.Items
        e.node.Value = .Select(0)
    End With
End Sub

The following C# sample changes the node's Value property when the user editor is closed ( in this case we have used the Exontrol's ExComboBox component ):

private void axXMLGrid1_UserEditorClose(object sender, AxEXMLGRIDLib._IXMLGridEvents_UserEditorCloseEvent e)
{
	EXCOMBOBOXLib.ComboBox comboBox = e.@object as EXCOMBOBOXLib.ComboBox;
	if (comboBox != null)
		e.node.Value = comboBox.get_Select(0);

}

In C# your project needs a new reference to the Exontrol's ExComboBox control library. Use the Project\Add Reference\COM item to add new reference to a COM object. Once that you added a reference to the Exontrol's ExComboBox the EXCOMBOBOXLib namespace is created. The EXCOMBOBOXLib namespace contains definitions for all objects that ExComboBox control exports.

The following VFP sample changes the node's Value property when the user editor is closed ( in this case we have used the Exontrol's ExComboBox component ):

*** ActiveX Control Event ***
LPARAMETERS object, node

node.value = object.Select(0)

 


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