

| 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.EXSURFACELib.Element Element)
{
}
Private Sub CreateElement(ByVal sender As System.Object,ByVal Element As exontrol.EXSURFACELib.Element) Handles CreateElement End Sub |
private void CreateElement(object sender, AxEXSURFACELib._ISurfaceEvents_CreateElementEvent e)
{
}
void OnCreateElement(LPDISPATCH Element)
{
}
void __fastcall CreateElement(TObject *Sender,Exsurfacelib_tlb::IElement *Element)
{
}
procedure CreateElement(ASender: TObject; Element : IElement); begin end; procedure CreateElement(sender: System.Object; e: AxEXSURFACELib._ISurfaceEvents_CreateElementEvent); begin end; begin event CreateElement(oleobject Element) end event CreateElement Private Sub CreateElement(ByVal sender As System.Object, ByVal e As AxEXSURFACELib._ISurfaceEvents_CreateElementEvent) Handles CreateElement End Sub Private Sub CreateElement(ByVal Element As EXSURFACELibCtl.IElement) End Sub Private Sub CreateElement(ByVal Element As Object) End Sub LPARAMETERS Element PROCEDURE OnCreateElement(oSurface,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.Surface.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 Surface1_CreateElement(ByVal Element As EXSURFACELibCtl.IElement)
With Element
.AutoSize = True
.Caption = "new " & Surface1.Elements.Count
.Edit exEditCaption
End With
End SubThe following VB sample creates an element that hosts the Exontrol.Button control:
Private Sub Surface1_CreateElement(ByVal Element As EXSURFACELibCtl.IElement)
With Element
.Type = exElementHostControl
.ElementFormat = """client"""
.Control = "Exontrol.Button"
With .Object
.Caption = "<sha ;;0>Button " & Surface1.Elements.Count
End With
End With
End Sub