Type | Description | |||
Object as Object | An object created by UserEditor property. | |||
Node as Node | A Node object that hosts an user editor. |
private void UserEditorOpen(object sender,object Obj,exontrol.EXMLGRIDLib.Node Node) { } Private Sub UserEditorOpen(ByVal sender As System.Object,ByVal Obj As Object,ByVal Node As exontrol.EXMLGRIDLib.Node) Handles UserEditorOpen End Sub |
private void UserEditorOpen(object sender, AxEXMLGRIDLib._IXMLGridEvents_UserEditorOpenEvent e) { } void OnUserEditorOpen(LPDISPATCH Object,LPDISPATCH Node) { } void __fastcall UserEditorOpen(TObject *Sender,IDispatch *Object,Exmlgridlib_tlb::INode *Node) { } procedure UserEditorOpen(ASender: TObject; Object : IDispatch;Node : INode); begin end; procedure UserEditorOpen(sender: System.Object; e: AxEXMLGRIDLib._IXMLGridEvents_UserEditorOpenEvent); begin end; begin event UserEditorOpen(oleobject Object,oleobject Node) end event UserEditorOpen Private Sub UserEditorOpen(ByVal sender As System.Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_UserEditorOpenEvent) Handles UserEditorOpen End Sub Private Sub UserEditorOpen(ByVal Object As Object,ByVal Node As EXMLGRIDLibCtl.INode) End Sub Private Sub UserEditorOpen(ByVal Object As Object,ByVal Node As Object) End Sub LPARAMETERS Object,Node PROCEDURE OnUserEditorOpen(oXMLGrid,Object,Node) RETURN |
<SCRIPT EVENT="UserEditorOpen(Object,Node)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function UserEditorOpen(Object,Node) End Function </SCRIPT> Procedure OnComUserEditorOpen Variant llObject Variant llNode Forward Send OnComUserEditorOpen llObject llNode End_Procedure METHOD OCX_UserEditorOpen(Object,Node) CLASS MainDialog RETURN NIL void onEvent_UserEditorOpen(COM _Object,COM _Node) { } function UserEditorOpen as v (Object as P,Node as OLE::Exontrol.XMLGrid.1::INode) end function function nativeObject_UserEditorOpen(Object,Node) return |
The following VB sample selects an item into an user editor of EXCOMBOBOXLibCtl.ComboBox ( Exontrol's ExComboBox control ) type:
Private Sub XMLGrid1_UserEditorOpen(ByVal Object As Object, ByVal Node As EXMLGRIDLibCtl.INode) On Error Resume Next With Object.Items .SelectItem(.FindItem(Node.Value)) = True End With End Sub
The following C++ sample selects an item into an user editor of EXCOMBOBOXLibCtl.ComboBox ( Exontrol's ExComboBox control ) type:
#import <excombobox.dll> void OnUserEditorOpenXmlgrid1(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 ) { long nItem = NULL; EXCOMBOBOXLib::IItemsPtr spItems = spComboBox->Items; if ( SUCCEEDED( spItems->get_FindItem( node.GetValue(), COleVariant( long(0) ), vtMissing, &nItem ) ) ) spItems->put_SelectItem( nItem, VARIANT_TRUE ); } }
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 selects an item into an user editor of EXCOMBOBOXLibCtl.ComboBox ( Exontrol's ExComboBox control ) type:
Private Sub AxXMLGrid1_UserEditorOpen(ByVal sender As Object, ByVal e As AxEXMLGRIDLib._IXMLGridEvents_UserEditorOpenEvent) Handles AxXMLGrid1.UserEditorOpen On Error Resume Next With e.object.Items .SelectItem(.FindItem(e.node.Value)) = True End With End Sub
The following C# sample selects an item into an user editor of EXCOMBOBOXLibCtl.ComboBox ( Exontrol's ExComboBox control ) type:
private void axXMLGrid1_UserEditorOpen(object sender, AxEXMLGRIDLib._IXMLGridEvents_UserEditorOpenEvent e) { EXCOMBOBOXLib.ComboBox comboBox = e.@object as EXCOMBOBOXLib.ComboBox; if (comboBox != null) { EXCOMBOBOXLib.Items items = comboBox.Items; int nItem = items.get_FindItem(e.node.Value, 0, null); if (nItem != 0) items.set_SelectItem(nItem, true); } }
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 selects an item into an user editor of EXCOMBOBOXLibCtl.ComboBox ( Exontrol's ExComboBox control ) type:
*** ActiveX Control Event *** LPARAMETERS object, node With object.Items .DefaultItem = .FindItem(node.Value,0) if ( .DefaultItem # 0 ) .SelectItem(0) = .t. endif EndWith