Type | Description | |||
Element as Element | An Element object being created. |
The order of the events when the user creates the element at runtime is:
The CreateElement event is not called during the LoadXML method.
Syntax for CreateElement event, /NET version, on:
private void CreateElement(object sender,exontrol.EXSWIMLANELib.Element Element) { } Private Sub CreateElement(ByVal sender As System.Object,ByVal Element As exontrol.EXSWIMLANELib.Element) Handles CreateElement End Sub |
private void CreateElement(object sender, AxEXSWIMLANELib._ISwimLaneEvents_CreateElementEvent e) { } void OnCreateElement(LPDISPATCH Element) { } void __fastcall CreateElement(TObject *Sender,Exswimlanelib_tlb::IElement *Element) { } procedure CreateElement(ASender: TObject; Element : IElement); begin end; procedure CreateElement(sender: System.Object; e: AxEXSWIMLANELib._ISwimLaneEvents_CreateElementEvent); begin end; begin event CreateElement(oleobject Element) end event CreateElement Private Sub CreateElement(ByVal sender As System.Object, ByVal e As AxEXSWIMLANELib._ISwimLaneEvents_CreateElementEvent) Handles CreateElement End Sub Private Sub CreateElement(ByVal Element As EXSWIMLANELibCtl.IElement) End Sub Private Sub CreateElement(ByVal Element As Object) End Sub LPARAMETERS Element PROCEDURE OnCreateElement(oSwimLane,Element) RETURN |
<SCRIPT EVENT="CreateElement(Element)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function CreateElement(Element) End Function </SCRIPT> Procedure OnComCreateElement Variant llElement Forward Send OnComCreateElement llElement End_Procedure METHOD OCX_CreateElement(Element) CLASS MainDialog RETURN NIL void onEvent_CreateElement(COM _Element) { } function CreateElement as v (Element as OLE::Exontrol.SwimLane.1::IElement) end function function nativeObject_CreateElement(Element) return |
The following VB sample calls the Edit method once a new element is created:
Private Sub SwimLane1_CreateElement(ByVal Element As EXSWIMLANELibCtl.IElement) With Element .AutoSize = True .Caption = "new " & SwimLane1.Elements.Count .Edit exEditCaption End With End Sub
The following VB sample creates an element that hosts the Exontrol.Button control:
Private Sub SwimLane1_CreateElement(ByVal Element As EXSWIMLANELibCtl.IElement) With Element .Type = exElementHostControl .ElementFormat = """client""" .Control = "Exontrol.Button" With .Object .Caption = "<sha ;;0>Button " & SwimLane1.Elements.Count End With End With End Sub