property Element.Control as String
Specifies the identifier of the inner control hosted by the current element.

TypeDescription
String A string expression that can be formatted as follows: a prog ID, a CLSID, a URL, a reference to an Active document , a fragment of HTML.
The control supports ActiveX hosting, or in other words, any element can host another inside controls. The Control property has effect only if the element's Type property is set on exElementHostControl. If you insert a runtime-licensed control you must specify the License property before calling the Control property. Use the ElementFormat property to specify the area where the inner control is displayed.  The Object property returns a reference to newly created control. The control fires the OLEEvent event if an inside ActiveX control fires an event. Use the InsertControl property to add a new Element object with the Type set on exElementHostControl, that hosts an ActiveX control.

The Control property must be formatted in one of the following ways:

The look and feel of the inner ActiveX control depends on the identifier you are using, and the version of the library that implements the ActiveX control, so you need to consult the documentation of the inner ActiveX control you are inserting inside the exSwimLane control. The License property indicates a string expression that indicates the runtime license key for the component being inserted, if required. Only, the vendor of the component you are going to use is able to give you such of runtime license, so please contact the control's vendor for such of key. Your development license key is not compatible with the runtime license key, so it can't be used here.

The following screen shot shows the surface with different Exontrol.Button controls:

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

The samples changes the element's Type to exElementHostControl, and after that specifies the Control property to create the desired inner control.

The following samples shows how you can host the Exontrol.Button on the surface.

VBA (MS Access, Excell...)

With SwimLane1
	With .Elements
		With .Add("ActiveX")
			.Type = 2
			.ElementFormat = """check"":18,""client"""
			.ShowCheckBox = True
			.Control = "Exontrol.Button"
			.Object.Caption = "<sha ;;0>button"
			.Height = 32
			.Width = 128
		End With
	End With
End With

VB6

With SwimLane1
	With .Elements
		With .Add("ActiveX")
			.Type = exElementHostControl
			.ElementFormat = """check"":18,""client"""
			.ShowCheckBox = True
			.Control = "Exontrol.Button"
			.Object.Caption = "<sha ;;0>button"
			.Height = 32
			.Width = 128
		End With
	End With
End With

VB.NET

With Exswimlane1
	With .Elements
		With .Add("ActiveX")
			.Type = exontrol.EXSWIMLANELib.ElementHostTypeEnum.exElementHostControl
			.ElementFormat = """check"":18,""client"""
			.ShowCheckBox = True
			.Control = "Exontrol.Button"
			.Object.Caption = "<sha ;;0>button"
			.Height = 32
			.Width = 128
		End With
	End With
End With

VB.NET for /COM

With AxSwimLane1
	With .Elements
		With .Add("ActiveX")
			.Type = EXSWIMLANELib.ElementHostTypeEnum.exElementHostControl
			.ElementFormat = """check"":18,""client"""
			.ShowCheckBox = True
			.Control = "Exontrol.Button"
			.Object.Caption = "<sha ;;0>button"
			.Height = 32
			.Width = 128
		End With
	End With
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSWIMLANELib' for the library: 'ExSwimLane 1.0 Control Library'

	#import <ExSwimLane.dll>
	using namespace EXSWIMLANELib;
*/
EXSWIMLANELib::ISwimLanePtr spSwimLane1 = GetDlgItem(IDC_SWIMLANE1)->GetControlUnknown();
EXSWIMLANELib::IElementsPtr var_Elements = spSwimLane1->GetElements();
	EXSWIMLANELib::IElementPtr var_Element = var_Elements->Add("ActiveX",vtMissing,vtMissing,vtMissing,vtMissing,vtMissing);
		var_Element->PutType(EXSWIMLANELib::exElementHostControl);
		var_Element->PutElementFormat(L"\"check\":18,\"client\"");
		var_Element->PutShowCheckBox(VARIANT_TRUE);
		var_Element->PutControl(L"Exontrol.Button");
		/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXBUTTONLib' for the library: 'ExButton 1.0 Control Library'

	#import <ExButton.dll>
	using namespace EXBUTTONLib;
*/
		((EXBUTTONLib::IButtonPtr)(var_Element->GetObject()))->PutCaption(L"<sha ;;0>button");
		var_Element->PutHeight(32);
		var_Element->PutWidth(128);

C++ Builder

Exswimlanelib_tlb::IElementsPtr var_Elements = SwimLane1->Elements;
	Exswimlanelib_tlb::IElementPtr var_Element = var_Elements->Add(TVariant("ActiveX"),TNoParam(),TNoParam(),TNoParam(),TNoParam(),TNoParam());
		var_Element->Type = Exswimlanelib_tlb::ElementHostTypeEnum::exElementHostControl;
		var_Element->ElementFormat = L"\"check\":18,\"client\"";
		var_Element->ShowCheckBox = true;
		var_Element->Control = L"Exontrol.Button";
		(IDispatch*)var_Element->Object->Caption = L"<sha ;;0>button";
		var_Element->Height = 32;
		var_Element->Width = 128;

C#

exontrol.EXSWIMLANELib.Elements var_Elements = exswimlane1.Elements;
	exontrol.EXSWIMLANELib.Element var_Element = var_Elements.Add("ActiveX",null,null,null,null,null);
		var_Element.Type = exontrol.EXSWIMLANELib.ElementHostTypeEnum.exElementHostControl;
		var_Element.ElementFormat = "\"check\":18,\"client\"";
		var_Element.ShowCheckBox = true;
		var_Element.Control = "Exontrol.Button";
		// Add 'ExButton 1.0 Control Library' reference to your project.
		(var_Element.Object as exontrol.EXBUTTONLib.exbutton).Caption = "<sha ;;0>button";
		var_Element.Height = 32;
		var_Element.Width = 128;

JavaScript

<OBJECT classid="clsid:AFA73FCE-6609-4062-AE6A-4BAD6D96A025" id="SwimLane1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	var var_Elements = SwimLane1.Elements;
		var var_Element = var_Elements.Add("ActiveX",null,null,null,null,null);
			var_Element.Type = 2;
			var_Element.ElementFormat = "\"check\":18,\"client\"";
			var_Element.ShowCheckBox = true;
			var_Element.Control = "Exontrol.Button";
			var_Element.Object.Caption = "<sha ;;0>button";
			var_Element.Height = 32;
			var_Element.Width = 128;
</SCRIPT>

C# for /COM

EXSWIMLANELib.Elements var_Elements = axSwimLane1.Elements;
	EXSWIMLANELib.Element var_Element = var_Elements.Add("ActiveX",null,null,null,null,null);
		var_Element.Type = EXSWIMLANELib.ElementHostTypeEnum.exElementHostControl;
		var_Element.ElementFormat = "\"check\":18,\"client\"";
		var_Element.ShowCheckBox = true;
		var_Element.Control = "Exontrol.Button";
		// Add 'ExButton 1.0 Control Library' reference to your project.
		(var_Element.Object as EXBUTTONLib.Button).Caption = "<sha ;;0>button";
		var_Element.Height = 32;
		var_Element.Width = 128;

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Element,com_Elements,com_Object;
	anytype var_Element,var_Elements,var_Object;
	;

	super();

	var_Elements = exswimlane1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("ActiveX"); com_Element = var_Element;
			com_Element.Type(2/*exElementHostControl*/);
			com_Element.ElementFormat("\"check\":18,\"client\"");
			com_Element.ShowCheckBox(true);
			com_Element.Control("Exontrol.Button");
			var_Object = COM::createFromObject(com_Element.Object()); com_Object = var_Object;
			com_Object.Caption("<sha ;;0>button");
			com_Element.Height(32);
			com_Element.Width(128);
}

Delphi 8 (.NET only)

with AxSwimLane1 do
begin
	with Elements do
	begin
		with Add('ActiveX',Nil,Nil,Nil,Nil,Nil) do
		begin
			Type := EXSWIMLANELib.ElementHostTypeEnum.exElementHostControl;
			ElementFormat := '"check":18,"client"';
			ShowCheckBox := True;
			Control := 'Exontrol.Button';
			(Object as EXBUTTONLib.Button).Caption := '<sha ;;0>button';
			Height := 32;
			Width := 128;
		end;
	end;
end

Delphi (standard)

with SwimLane1 do
begin
	with Elements do
	begin
		with Add('ActiveX',Null,Null,Null,Null,Null) do
		begin
			Type := EXSWIMLANELib_TLB.exElementHostControl;
			ElementFormat := '"check":18,"client"';
			ShowCheckBox := True;
			Control := 'Exontrol.Button';
			(IUnknown(Object) as EXBUTTONLib_TLB.Button).Caption := '<sha ;;0>button';
			Height := 32;
			Width := 128;
		end;
	end;
end

VFP

with thisform.SwimLane1
	with .Elements
		with .Add("ActiveX")
			.Type = 2
			.ElementFormat = ""+chr(34)+"check"+chr(34)+":18,"+chr(34)+"client"+chr(34)+""
			.ShowCheckBox = .T.
			.Control = "Exontrol.Button"
			.Object.Caption = "<sha ;;0>button"
			.Height = 32
			.Width = 128
		endwith
	endwith
endwith

dBASE Plus

local oSwimLane,var_Element,var_Elements

oSwimLane = form.Activex1.nativeObject
var_Elements = oSwimLane.Elements
	var_Element = var_Elements.Add("ActiveX")
		var_Element.Type = 2
		var_Element.ElementFormat = "" + ["] + "check" + ["] + ":18," + ["] + "client" + ["] + ""
		var_Element.ShowCheckBox = true
		var_Element.Control = "Exontrol.Button"
		var_Element.Object.Caption = "<sha ;;0>button"
		var_Element.Height = 32
		var_Element.Width = 128

XBasic (Alpha Five)

Dim oSwimLane as P
Dim var_Element as P
Dim var_Elements as P

oSwimLane = topparent:CONTROL_ACTIVEX1.activex
var_Elements = oSwimLane.Elements
	var_Element = var_Elements.Add("ActiveX")
		var_Element.Type = 2
		var_Element.ElementFormat = "\"check\":18,\"client\""
		var_Element.ShowCheckBox = .t.
		var_Element.Control = "Exontrol.Button"
		var_Element.Object.Caption = "<sha ;;0>button"
		var_Element.Height = 32
		var_Element.Width = 128

Visual Objects

local var_Element as IElement
local var_Elements as IElements

var_Elements := oDCOCX_Exontrol1:Elements
	var_Element := var_Elements:Add("ActiveX",nil,nil,nil,nil,nil)
		var_Element:Type := exElementHostControl
		var_Element:ElementFormat := "" + CHR(34) + "check" + CHR(34) + ":18," + CHR(34) + "client" + CHR(34) + ""
		var_Element:ShowCheckBox := true
		var_Element:Control := "Exontrol.Button"
		// Generate Source for 'ExButton 1.0 Control Library' server from Tools\Automation Server...
		IButton{var_Element:Object}:Caption := "<sha ;;0>button"
		var_Element:Height := 32
		var_Element:Width := 128

PowerBuilder

OleObject oSwimLane,var_Element,var_Elements

oSwimLane = ole_1.Object
var_Elements = oSwimLane.Elements
	var_Element = var_Elements.Add("ActiveX")
		var_Element.Type = 2
		var_Element.ElementFormat = "" + CHAR(34) + "check" + CHAR(34) + ":18," + CHAR(34) + "client" + CHAR(34) + ""
		var_Element.ShowCheckBox = true
		var_Element.Control = "Exontrol.Button"
		var_Element.Object.Caption = "<sha ;;0>button"
		var_Element.Height = 32
		var_Element.Width = 128

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Variant voElement
		Get ComAdd of hoElements "ActiveX" Nothing Nothing Nothing Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComType of hoElement to OLEexElementHostControl
			Set ComElementFormat of hoElement to ""check":18,"client""
			Set ComShowCheckBox of hoElement to True
			Set ComControl of hoElement to "Exontrol.Button"
			Variant voButton
			Get ComObject of hoElement to voButton
			Handle hoButton
			Get Create (RefClass(cComButton)) to hoButton
			Set pvComObject of hoButton to voButton
				Set ComCaption of hoButton to "<sha ;;0>button"
			Send Destroy to hoButton
			Set ComHeight of hoElement to 32
			Set ComWidth of hoElement to 128
		Send Destroy to hoElement
	Send Destroy to hoElements
End_Procedure

XBase++

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oElement
	LOCAL oElements
	LOCAL oSwimLane

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oSwimLane := XbpActiveXControl():new( oForm:drawingArea )
	oSwimLane:CLSID  := "Exontrol.SwimLane.1" /*{AFA73FCE-6609-4062-AE6A-4BAD6D96A025}*/
	oSwimLane:create(,, {10,60},{610,370} )

		oElements := oSwimLane:Elements()
			oElement := oElements:Add("ActiveX")
				oElement:Type := 2/*exElementHostControl*/
				oElement:ElementFormat := "" + CHR(34) + "check" + CHR(34) + ":18," + CHR(34) + "client" + CHR(34) + ""
				oElement:ShowCheckBox := .T.
				oElement:Control := "Exontrol.Button"
				oElement:Object():Caption := "<sha ;;0>button"
				oElement:Height := 32
				oElement:Width := 128

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN