Type | Description | |||
X as Variant | A Long expression that specifies the x-coordinate of the pool. | |||
Y as Variant | A Long expression that specifies the y-coordinate of the pool. | |||
Width as Variant | A Long expression that specifies the width of the pool. | |||
Height as Variant | A Long expression that specifies the height of the pool. |
Return | Description | |||
Pool | A Pool object being created. |
The following samples show how you can programmatically add a new pool on the surface:
VBA (MS Access, Excell...)
With SwimLane1 .BeginUpdate With .Pools.Add(-250,-150,500,250) .Lane(0).Children.Count = 4 .Lane(1).Children.Count = 4 End With .EndUpdate End With
VB6
With SwimLane1 .BeginUpdate With .Pools.Add(-250,-150,500,250) .Lane(exLaneHorizontal).Children.Count = 4 .Lane(exLaneVertical).Children.Count = 4 End With .EndUpdate End With
VB.NET
With Exswimlane1 .BeginUpdate() With .Pools.Add(-250,-150,500,250) .get_Lane(exontrol.EXSWIMLANELib.LaneTypeEnum.exLaneHorizontal).Children.Count = 4 .get_Lane(exontrol.EXSWIMLANELib.LaneTypeEnum.exLaneVertical).Children.Count = 4 End With .EndUpdate() End With
VB.NET for /COM
With AxSwimLane1 .BeginUpdate() With .Pools.Add(-250,-150,500,250) .Lane(EXSWIMLANELib.LaneTypeEnum.exLaneHorizontal).Children.Count = 4 .Lane(EXSWIMLANELib.LaneTypeEnum.exLaneVertical).Children.Count = 4 End With .EndUpdate() 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(); spSwimLane1->BeginUpdate(); EXSWIMLANELib::IPoolPtr var_Pool = spSwimLane1->GetPools()->Add(long(-250),long(-150),long(500),long(250)); var_Pool->GetLane(EXSWIMLANELib::exLaneHorizontal)->GetChildren()->PutCount(4); var_Pool->GetLane(EXSWIMLANELib::exLaneVertical)->GetChildren()->PutCount(4); spSwimLane1->EndUpdate();
C++ Builder
SwimLane1->BeginUpdate(); Exswimlanelib_tlb::IPoolPtr var_Pool = SwimLane1->Pools->Add(TVariant(-250),TVariant(-150),TVariant(500),TVariant(250)); var_Pool->get_Lane(Exswimlanelib_tlb::LaneTypeEnum::exLaneHorizontal)->Children->Count = 4; var_Pool->get_Lane(Exswimlanelib_tlb::LaneTypeEnum::exLaneVertical)->Children->Count = 4; SwimLane1->EndUpdate();
C#
exswimlane1.BeginUpdate(); exontrol.EXSWIMLANELib.Pool var_Pool = exswimlane1.Pools.Add(-250,-150,500,250); var_Pool.get_Lane(exontrol.EXSWIMLANELib.LaneTypeEnum.exLaneHorizontal).Children.Count = 4; var_Pool.get_Lane(exontrol.EXSWIMLANELib.LaneTypeEnum.exLaneVertical).Children.Count = 4; exswimlane1.EndUpdate();
JScript/JavaScript
<BODY onload="Init()"> <OBJECT CLASSID="clsid:AFA73FCE-6609-4062-AE6A-4BAD6D96A025" id="SwimLane1"></OBJECT> <SCRIPT LANGUAGE="JScript"> function Init() { SwimLane1.BeginUpdate(); var var_Pool = SwimLane1.Pools.Add(-250,-150,500,250); var_Pool.Lane(0).Children.Count = 4; var_Pool.Lane(1).Children.Count = 4; SwimLane1.EndUpdate(); } </SCRIPT> </BODY>
VBScript
<BODY onload="Init()"> <OBJECT CLASSID="clsid:AFA73FCE-6609-4062-AE6A-4BAD6D96A025" id="SwimLane1"></OBJECT> <SCRIPT LANGUAGE="VBScript"> Function Init() With SwimLane1 .BeginUpdate With .Pools.Add(-250,-150,500,250) .Lane(0).Children.Count = 4 .Lane(1).Children.Count = 4 End With .EndUpdate End With End Function </SCRIPT> </BODY>
C# for /COM
axSwimLane1.BeginUpdate(); EXSWIMLANELib.Pool var_Pool = axSwimLane1.Pools.Add(-250,-150,500,250); var_Pool.get_Lane(EXSWIMLANELib.LaneTypeEnum.exLaneHorizontal).Children.Count = 4; var_Pool.get_Lane(EXSWIMLANELib.LaneTypeEnum.exLaneVertical).Children.Count = 4; axSwimLane1.EndUpdate();
X++ (Dynamics Ax 2009)
public void init() { COM com_Lane,com_Lanes,com_Pool; anytype var_Lane,var_Lanes,var_Pool; ; super(); exswimlane1.BeginUpdate(); var_Pool = COM::createFromObject(exswimlane1.Pools()).Add(COMVariant::createFromInt(-250),COMVariant::createFromInt(-150),COMVariant::createFromInt(500),COMVariant::createFromInt(250)); com_Pool = var_Pool; var_Lane = COM::createFromObject(com_Pool.Lane(0/*exLaneHorizontal*/)); com_Lane = var_Lane; var_Lanes = COM::createFromObject(com_Lane).Children(); com_Lanes = var_Lanes; com_Lanes.Count(4); var_Lane = COM::createFromObject(com_Pool.Lane(1/*exLaneVertical*/)); com_Lane = var_Lane; var_Lanes = COM::createFromObject(com_Lane).Children(); com_Lanes = var_Lanes; com_Lanes.Count(4); exswimlane1.EndUpdate(); }
Delphi 8 (.NET only)
with AxSwimLane1 do begin BeginUpdate(); with Pools.Add(TObject(-250),TObject(-150),TObject(500),TObject(250)) do begin Lane[EXSWIMLANELib.LaneTypeEnum.exLaneHorizontal].Children.Count := 4; Lane[EXSWIMLANELib.LaneTypeEnum.exLaneVertical].Children.Count := 4; end; EndUpdate(); end
Delphi (standard)
with SwimLane1 do begin BeginUpdate(); with Pools.Add(OleVariant(-250),OleVariant(-150),OleVariant(500),OleVariant(250)) do begin Lane[EXSWIMLANELib_TLB.exLaneHorizontal].Children.Count := 4; Lane[EXSWIMLANELib_TLB.exLaneVertical].Children.Count := 4; end; EndUpdate(); end
VFP
with thisform.SwimLane1 .BeginUpdate with .Pools.Add(-250,-150,500,250) .Lane(0).Children.Count = 4 .Lane(1).Children.Count = 4 endwith .EndUpdate endwith
dBASE Plus
local oSwimLane,var_Lanes,var_Lanes1,var_Pool oSwimLane = form.EXSWIMLANEACTIVEXCONTROL1.nativeObject oSwimLane.BeginUpdate() var_Pool = oSwimLane.Pools.Add(-250,-150,500,250) // var_Pool.Lane(0).Children.Count = 4 var_Lanes = var_Pool.Lane(0).Children with (oSwimLane) TemplateDef = [dim var_Lanes] TemplateDef = var_Lanes Template = [var_Lanes.Count = 4] endwith // var_Pool.Lane(1).Children.Count = 4 var_Lanes1 = var_Pool.Lane(1).Children with (oSwimLane) TemplateDef = [dim var_Lanes1] TemplateDef = var_Lanes1 Template = [var_Lanes1.Count = 4] endwith oSwimLane.EndUpdate()
XBasic (Alpha Five)
Dim oSwimLane as P Dim var_Lanes as local Dim var_Lanes1 as local Dim var_Pool as P oSwimLane = topparent:CONTROL_ACTIVEX1.activex oSwimLane.BeginUpdate() var_Pool = oSwimLane.Pools.Add(-250,-150,500,250) ' var_Pool.Lane(0).Children.Count = 4 var_Lanes = var_Pool.Lane(0).Children oSwimLane.TemplateDef = "dim var_Lanes" oSwimLane.TemplateDef = var_Lanes oSwimLane.Template = "var_Lanes.Count = 4" ' var_Pool.Lane(1).Children.Count = 4 var_Lanes1 = var_Pool.Lane(1).Children oSwimLane.TemplateDef = "dim var_Lanes1" oSwimLane.TemplateDef = var_Lanes1 oSwimLane.Template = "var_Lanes1.Count = 4" oSwimLane.EndUpdate()
Visual Objects
local var_Pool as IPool oDCOCX_Exontrol1:BeginUpdate() var_Pool := oDCOCX_Exontrol1:Pools:Add(-250,-150,500,250) var_Pool:[Lane,exLaneHorizontal]:Children:Count := 4 var_Pool:[Lane,exLaneVertical]:Children:Count := 4 oDCOCX_Exontrol1:EndUpdate()
PowerBuilder
OleObject oSwimLane,var_Pool oSwimLane = ole_1.Object oSwimLane.BeginUpdate() var_Pool = oSwimLane.Pools.Add(-250,-150,500,250) var_Pool.Lane(0).Children.Count = 4 var_Pool.Lane(1).Children.Count = 4 oSwimLane.EndUpdate()
Visual DataFlex
Procedure OnCreate Forward Send OnCreate Send ComBeginUpdate Variant voPools Get ComPools to voPools Handle hoPools Get Create (RefClass(cComPools)) to hoPools Set pvComObject of hoPools to voPools Variant voPool Get ComAdd of hoPools -250 -150 500 250 to voPool Handle hoPool Get Create (RefClass(cComPool)) to hoPool Set pvComObject of hoPool to voPool Variant voLane Get ComLane of hoPool OLEexLaneHorizontal to voLane Handle hoLane Get Create (RefClass(cComLane)) to hoLane Set pvComObject of hoLane to voLane Variant voLanes Get ComChildren of hoLane to voLanes Handle hoLanes Get Create (RefClass(cComLanes)) to hoLanes Set pvComObject of hoLanes to voLanes Set ComCount of hoLanes to 4 Send Destroy to hoLanes Send Destroy to hoLane Variant voLane1 Get ComLane of hoPool OLEexLaneVertical to voLane1 Handle hoLane1 Get Create (RefClass(cComLane)) to hoLane1 Set pvComObject of hoLane1 to voLane1 Variant voLanes1 Get ComChildren of hoLane1 to voLanes1 Handle hoLanes1 Get Create (RefClass(cComLanes)) to hoLanes1 Set pvComObject of hoLanes1 to voLanes1 Set ComCount of hoLanes1 to 4 Send Destroy to hoLanes1 Send Destroy to hoLane1 Send Destroy to hoPool Send Destroy to hoPools Send ComEndUpdate End_Procedure
XBase++
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oPool 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} ) oSwimLane:BeginUpdate() oPool := oSwimLane:Pools():Add(-250,-150,500,250) oPool:Lane(0/*exLaneHorizontal*/):Children():Count := 4 oPool:Lane(1/*exLaneVertical*/):Children():Count := 4 oSwimLane:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN