156
Fullfit the caption on the element's width

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 "<solidline><b>Bank Account</b></solidline><br>+ owner: String <r><a 1;properties>+</a><br><solidline>+ balance: Currency = 0</solidline><br>+ deposit(amount: Currency)<r><a 2;methods>+</a><br>+ withdraw(amount: Currency)" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComCaptionSingleLine of hoElement to OLEexCaptionBreakWrap
			Set ComBackColor of hoElement to (RGB(248,248,248))
			Set ComAutoSize of hoElement to False
			Set ComWidth of hoElement to 194
			Set ComHeight of hoElement to 76
			Set ComCaptionAlign of hoElement to |CI$4
		Send Destroy to hoElement
	Send Destroy to hoElements
End_Procedure
155
Wrap the caption by <br> or "\r\n" sequence only

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 "<solidline><b>Bank Account</b></solidline><br>+ owner: String <r><a 1;properties>+</a><br><solidline>+ balance: Currency = 0</solidline><br>+ deposit(amount: Currency)<r><a 2;methods>+</a><br>+ withdraw(amount: Currency)" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComCaptionSingleLine of hoElement to OLEexCaptionBreakWrap
			Set ComBackColor of hoElement to (RGB(248,248,248))
		Send Destroy to hoElement
	Send Destroy to hoElements
End_Procedure
154
Display a custom tooltip
// Occurs when the user moves the mouse.
Procedure OnComMouseMove Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseMove llButton llShift llX llY
	Send ComShowToolTip "new content" "" "+8" "+8"
End_Procedure


153
Shows the tooltip of the object moved relative to its default position
// Occurs when the user moves the mouse.
Procedure OnComMouseMove Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseMove llButton llShift llX llY
	Send ComShowToolTip "<null>" "<null>" "+8" "+8"
End_Procedure

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 "Element with a Tooltip" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComToolTip of hoElement to "This is a bit of text that should be displayed when cursor hovers the element."
		Send Destroy to hoElement
	Send Destroy to hoElements
End_Procedure
152
Rename Undo/Redo commands into the control's toolbar

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Set ComToolBarFormat to "-1,100,101,|,103,104"
	Set ComToolBarCaption 100 to "<img>1</img>Acasa"
	Set ComToolBarCaption 103 to "Anuleaza <img>3</img>"
	Set ComToolBarCaption 104 to "<img>4</img>Reface"
	Set ComToolBarToolTip 100 to "Restabileste vizualizarea la origine."
	Set ComToolBarToolTip 101 to "Mareste vizualizarea."
	Set ComToolBarToolTip 103 to "Anuleaza ultima actiune UI. Pentru a anula o actiune apasati Ctrl+Z."
	Set ComToolBarToolTip 104 to "Inverseaza cea mai recenta operatie de anulare. Pentru a reface o actiune apasati Ctrl+Y."
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -48 to Nothing
		Get ComAdd of hoElements "Item <b>2" 32 32 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComEndUpdate
End_Procedure
151
Add Undo/Redo commands to control's toolbar

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Set ComToolBarFormat to "-1,100,101,|,103,104"
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -48 to Nothing
		Get ComAdd of hoElements "Item <b>2" 32 32 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComEndUpdate
End_Procedure
150
Clear Undo/Redo queue (method 2)
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Variant c
	Get ComUndoRedoQueueLength to c
	Set ComUndoRedoQueueLength to 0
	Set ComUndoRedoQueueLength to c
	Showln (ComUndoListAction(Self,Nothing,Nothing))
	Send ComEndUpdate
End_Procedure
149
Clear Undo/Redo queue (method 1)
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Set ComAllowUndoRedo to True
	Showln (ComUndoListAction(Self,Nothing,Nothing))
	Send ComEndUpdate
End_Procedure
148
Removes Redo operations
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComUndo
	Send ComRedoRemoveAction 10 Nothing
	Showln (ComRedoListAction(Self,Nothing,Nothing))
	Send ComEndUpdate
End_Procedure
147
Removes Undo operations
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComUndoRemoveAction 10 Nothing
	Showln (ComUndoListAction(Self,Nothing,Nothing))
	Send ComEndUpdate
End_Procedure
146
Record the UI operations as a block of undo/redo operations

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Send ComStartBlockUndoRedo
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComEndBlockUndoRedo
	Showln (ComUndoListAction(Self,Nothing,Nothing))
	Send ComEndUpdate
End_Procedure
145
Groups the next to current Undo/Redo Actions in a single block

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComGroupUndoRedoActions 3
	Showln (ComUndoListAction(Self,Nothing,Nothing))
	Send ComEndUpdate
End_Procedure
144
Limits the number of entries within the Undo/Redo queue

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Set ComUndoRedoQueueLength to 1
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Showln (ComUndoListAction(Self,Nothing,Nothing))
	Send ComEndUpdate
End_Procedure
143
Lists the Redo actions that can be performed on the surface

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComUndo
	Showln (ComRedoListAction(Self,Nothing,Nothing))
	Send ComEndUpdate
End_Procedure
142
Lists the Undo actions that can be performed on the surface

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Showln (ComUndoListAction(Self,Nothing,Nothing))
	Send ComEndUpdate
End_Procedure
141
Checks whether the Undo operation is possible

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComUndo
	Showln "CanRedo" (ComCanRedo(Self))
	Send ComEndUpdate
End_Procedure
140
Call Redo by code

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComUndo
	Send ComRedo
	Send ComEndUpdate
End_Procedure
139
Checks whether the Undo operation is possible

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Showln "CanUndo" (ComCanUndo(Self))
	Send ComEndUpdate
End_Procedure
138
Call Undo by code

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComUndo
	Send ComEndUpdate
End_Procedure
137
Save the element's properties for Undo/Redo operations, by code

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
		Get ComAdd of hoElements "Item <b>2" Nothing Nothing to Nothing
	Send Destroy to hoElements
	Send ComStartBlockUndoRedo
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
				Variant voLink
		Get ComAdd of hoLinks vFrom vTo Nothing to voLink
		Handle hoLink
		Get Create (RefClass(cComLink)) to hoLink
		Set pvComObject of hoLink to voLink
			Variant h
			Get ComStartUpdateLink of hoLink to h
			Set ComColor of hoLink to (RGB(255,0,0))
			Set ComWidth of hoLink to 2
			Set ComShowDir of hoLink to False
			Set ComShowLinkType of hoLink to OLEexLinkStraight
			Send ComEndUpdateLink of hoLink h
		Send Destroy to hoLink
	Send Destroy to hoLinks
	Send ComEndBlockUndoRedo
	Send ComEndUpdate
End_Procedure
136
No color is restored for the link when Undo/Redo operation is executed

// A new element has been added to the surface.
Procedure OnComAddElement Variant   llElement
	Forward Send OnComAddElement llElement
	// Element.ShowCheckBox = True
	// Element.CheckBoxAlign = 2
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Check <b>1" -64 -64 to Nothing
		Variant voElement
		Get ComAdd of hoElements "Check <b>2" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComChecked of hoElement to OLEexChecked
		Send Destroy to hoElement
	Send Destroy to hoElements
	Send ComStartBlockUndoRedo
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
				Variant voLink
		Get ComAdd of hoLinks vFrom vTo Nothing to voLink
		Handle hoLink
		Get Create (RefClass(cComLink)) to hoLink
		Set pvComObject of hoLink to voLink
			Variant h
			Get ComStartUpdateLink of hoLink to h
			Set ComColor of hoLink to (RGB(255,0,0))
			Set ComWidth of hoLink to 2
			Set ComShowDir of hoLink to False
			Set ComShowLinkType of hoLink to OLEexLinkStraight
			Send ComEndUpdateLink of hoLink h
		Send Destroy to hoLink
	Send Destroy to hoLinks
	Send ComEndBlockUndoRedo
	Send ComEndUpdate
End_Procedure
135
Save the element's properties for Undo/Redo operations, by code

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
	Send Destroy to hoElements
	Send ComStartBlockUndoRedo
	Variant voElements1
	Get ComElements to voElements1
	Handle hoElements1
	Get Create (RefClass(cComElements)) to hoElements1
	Set pvComObject of hoElements1 to voElements1
		Variant voElement
		Get ComAdd of hoElements1 "Item <b>2" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Variant h
			Get ComStartUpdateElement of hoElement to h
			Set ComBackColor of hoElement to (RGB(0,0,0))
			Set ComForeColor of hoElement to (RGB(255,255,255))
			Set ComBorderColor of hoElement to (RGB(255,0,0))
			Send ComEndUpdateElement of hoElement h
		Send Destroy to hoElement
	Send Destroy to hoElements1
	Send ComEndBlockUndoRedo
	Send ComEndUpdate
End_Procedure
134
No color is restored for the element when Undo/Redo operation is executed

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Item <b>1" -64 -64 to Nothing
	Send Destroy to hoElements
	Send ComStartBlockUndoRedo
	Variant voElements1
	Get ComElements to voElements1
	Handle hoElements1
	Get Create (RefClass(cComElements)) to hoElements1
	Set pvComObject of hoElements1 to voElements1
		Variant voElement
		Get ComAdd of hoElements1 "Item <b>2" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Variant h
			Get ComStartUpdateElement of hoElement to h
			Set ComBackColor of hoElement to (RGB(0,0,0))
			Set ComForeColor of hoElement to (RGB(255,255,255))
			Set ComBorderColor of hoElement to (RGB(255,0,0))
			Send ComEndUpdateElement of hoElement h
		Send Destroy to hoElement
	Send Destroy to hoElements1
	Send ComEndBlockUndoRedo
	Send ComEndUpdate
End_Procedure
133
How can I ensure that a specified element fits the surface's visible area

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 "Element A" -100 Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Variant voPattern
			Get ComPattern of hoElement to voPattern
			Handle hoPattern
			Get Create (RefClass(cComPattern)) to hoPattern
			Set pvComObject of hoPattern to voPattern
				Set ComType of hoPattern to OLEexPatternBDiagonal
				Set ComColor of hoPattern to (RGB(224,224,224))
			Send Destroy to hoPattern
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element B" 2000 Nothing to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Send ComEnsureVisible of hoElement1
		Send Destroy to hoElement1
	Send Destroy to hoElements
End_Procedure
132
LayoutEndChanging(exUndo), LayoutEndChanging(exRedo) or LayoutEndChanging(exUndoRedoUpdate) notifiy your application once a Undo/Redo operation is executed (CTRL+Z, CTRL+Y) or updated

// A new element has been added to the surface.
Procedure OnComAddElement Variant   llElement
	Forward Send OnComAddElement llElement
	// Element.ShowCheckBox = True
	// Element.CheckBoxAlign = 2
End_Procedure

// Notifies your application once the control's layout has been changed.
Procedure OnComLayoutEndChanging OLELayoutChangingEnum   llOperation
	Forward Send OnComLayoutEndChanging llOperation
	Showln "LayoutEndChanging" llOperation
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Check <b>1" -64 -64 to Nothing
		Variant voElement
		Get ComAdd of hoElements "Check <b>2" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComChecked of hoElement to OLEexChecked
		Send Destroy to hoElement
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComEndUpdate
End_Procedure
131
Turn on the Undo/Redo feature

// A new element has been added to the surface.
Procedure OnComAddElement Variant   llElement
	Forward Send OnComAddElement llElement
	// Element.ShowCheckBox = True
	// Element.CheckBoxAlign = 2
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowUndoRedo to True
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Check <b>1" -64 -64 to Nothing
		Variant voElement
		Get ComAdd of hoElements "Check <b>2" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComChecked of hoElement to OLEexChecked
		Send Destroy to hoElement
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
	Send ComEndUpdate
End_Procedure
130
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)

// A new element has been added to the surface.
Procedure OnComAddElement Variant   llElement
	Forward Send OnComAddElement llElement
	// Element.ShowCheckBox = True
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComImageSize to 32
	Variant voStdFont
	Get ComFont to voStdFont
	Handle hoStdFont
	Get Create (RefClass(cComStdFont)) to hoStdFont
	Set pvComObject of hoStdFont to voStdFont
		Set ComSize of hoStdFont to 16
	Send Destroy to hoStdFont
	Send ComImages ("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqNUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlwyV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+CMPo9MBMC+j2vC8j7wS8cFNI4kBo05UIvfCT/NsnsApU+0Fqg/T+oy/kPxC0sEQfErKQK96+w28UWRI8UGvO8sTLS9r2PWmsMJTDTask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0mR9l9HqX8fJgTDmFMVH0MIsRzVYnwnMi1dyzmhLt2kS2pxIiU62Wj5ptQGlSYFakLonTUJNLKaM5WzlffEkuFkk5wTrhVO2eE7G6lJhxFFYUZ55zmn0WuBCD4pzhirFCKkbomsOoIYmZx5p90LoYWGPdD5g0QmJRKYxbZ6zYoVQ2jVGylSak7KSkFH6RSjpHKFuU+YMyNo5SulkC6I0vonTCitMXPoEpVS2H5FQfEqp2R1opIgAEkJISYARTCukOhmPNI5Ex/wzGHUsicMwA1LHgQ90Y/KpoQHAD+pB/R4NzIaMAB9Xaw1gqaAOsh/A/ptIkWUfhGK1kZH8RgH5GqvgArqRmt4AAPrTroRofBGADkqr6Rmu4D7CEaHARiwpJrEEZsXXwlVjyMWRsaRqwdkLGNBABZmytmyMnaINZqyVpLR2ftKAAAdd6h2osbaskdiq4EZtgSmyNcbVW" + ;
"RJNXe3AA7REar3b0stlAAXBtoRmvJGLjEYAHUWsFcwCD/rnaop9aEICMAPdK5hT6xpeuzdOtAgKuJeGfdq6ggEbkTvAP+p9UCHXrvKkcgIA==")
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "gBFLBCJwBAEHhEJAAEhABfICg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziaQAGgkNQwCSLIwjNIsBxPFKVQChEYxSjKA40SJNUgyj6CCY+QLIE5PfQgAL9I6eJABCCSQKkYx0HScRiwPBIbAZAYhCZqaKhWgkKI/WBQIABRDVLx5ESiLRtKy7Mq2bpvXBcNxXHalaztO68LxvKyqHb5fJ/PpgL4YHgmC4NQ7EMRwF6rfbyfZ7Xg/ORPTijZ4sdzMHTzJyscx3HqfaBoOaZU5eMLceTUMofHIndxCcasPbsOatVqjG5sYjcGC3La9cz3Pq/bpuDCbMxuaK1TrYXr1TTrcofBDld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CjDSPgHI4QnApAKBICwHg1A+BcAwcYsgbjGGQNkCIgRsA6EcBEWANADjsB0B8YYzQQDIGSBcEYZBCCPEkFIHQSgkgZAwG4IwBAbAYGGAgL4Ch4g8BOCQAA2KKC0GcAke4AAXAFCoHkDw4xbBFEcJkE4JRSiEFeJYKQVRMgJHODwX4xAgC/AsIIZAeAHDRG0HYI40RKCLEGDUI4jAghwBWIceA+whCpHMFYZYOQxglDMHMBQGxYj" + ;
"VHiAoBIPgfgHGwPsHYJRSB6A0IERQLhCjJHMA4OQoAoCOACLYGYSx8DpBQIMWQdRnDRH+DsE4fB3CeAmM67kAAXBFEIDYDI7wLBtEoEIfYNwjiUGGJQYQMAjCHEAO0C4zxW29CoCgfIxR9AKA6J8BgUAIhDGMIoJ40hqgwCgKETgnBhhqCGI0AIqgZhGDANQDIlBDCRGkCoJISR0g1BSKQOgfAzBRG0DYHARh4DeDAOwANuw8ApCKKkYg/RPhjBsH0J4yg5hPGWN0GwFBHQBFaDoQIURljFAoB4GgzRVzbBECQFQRQoguHGHANwDRdCKy8CgSIGwhhoDYJYYI1giBICSAEgI=") to Nothing
	Send Destroy to hoAppearance
	Set ComBackground OLEexCheckBoxState0 to |CI$1000000
	Set ComBackground OLEexCheckBoxState1 to |CI$2000000
	Set ComBackground OLEexCheckBoxState2 to |CI$3000000
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Variant v
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComAdd of hoElements1 "Element Check 1" -64 -64 to v
			Send Destroy to hoElements1
		Variant var_Element
		Move v to var_Element
		Variant voElement
		Get ComAdd of hoElements "Child" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComParent of hoElement to var_Element
		Send Destroy to hoElement
			Set ComPictures of hoElements to "1/2"
			Set ComExpanded of hoElements to False
		Send Destroy to hoElements
		Variant voElement1
		Get ComAdd "Element Check 2" 32 96 to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComChecked of hoElement1 to OLEexChecked
			Set ComPictures of hoElement1 to "1,2"
		Send Destroy to hoElement1
	Send ComHome
	Send ComEndUpdate
End_Procedure
129
ImageSize property on 16 (default) (specifies the size of control' icons)

// A new element has been added to the surface.
Procedure OnComAddElement Variant   llElement
	Forward Send OnComAddElement llElement
	// Element.ShowCheckBox = True
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComImageSize to 16
	Send ComImages "gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqdSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVttmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8acvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtTGsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgPnwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg=="
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Variant v
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComAdd of hoElements1 "Element Check 1" -64 -64 to v
			Send Destroy to hoElements1
		Variant var_Element
		Move v to var_Element
		Variant voElement
		Get ComAdd of hoElements "Child" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComParent of hoElement to var_Element
		Send Destroy to hoElement
			Set ComPictures of hoElements to "1/2"
			Set ComExpanded of hoElements to False
		Send Destroy to hoElements
		Variant voElement1
		Get ComAdd "Element Check 2" 0 32 to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComChecked of hoElement1 to OLEexChecked
			Set ComPictures of hoElement1 to "1,2"
		Send Destroy to hoElement1
	Send ComHome
	Send ComEndUpdate
End_Procedure
128
We want to have option to start/end connectors at the middle of each side of the elements

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComShowLinks to OLEexShowLinks
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>1" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>2" 164 64 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>3" 0 132 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 3 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 2 to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
	Send Destroy to hoLinks
	Send ComFitToClient
	Send ComEndUpdate
End_Procedure
127
How can I determine the position the user clicks within the element's boundaries (Click event)

// Occurs when the user presses and then releases the left mouse button over the control.
Procedure OnComClick 
	Forward Send OnComClick 
	Variant e
	Get ComElementFromPoint -1 -1 to e
	Variant X
	Move -1 to X
	Variant Y
	Move -1 to Y
	Send ComPointToPosition X Y
	Showln  e X Y
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element 1" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element 2" 128 64 to Nothing
	Send Destroy to hoElements
	Send ComFitToClient
	Send ComEndUpdate
End_Procedure
126
How can I determine the position the user clicks within the element's boundaries (MouseMove event)

// Occurs when the user moves the mouse.
Procedure OnComMouseMove Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseMove llButton llShift llX llY
	Variant e
	Get ComElementFromPoint llX llY to e
	Send ComPointToPosition llX llY
	Showln  e llX llY
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element 1" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element 2" 128 64 to Nothing
	Send Destroy to hoElements
	Send ComFitToClient
	Send ComEndUpdate
End_Procedure
125
How can I convert the screen position (mouse) to surface position

// Occurs when the user moves the mouse.
Procedure OnComMouseMove Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComMouseMove llButton llShift llX llY
	Showln "Point " llX llY
	Send ComPointToPosition llX llY
	Showln "Position " llX llY
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>1" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>2" 164 64 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>3" 0 132 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 3 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 2 to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 3 to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 1 to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
	Send Destroy to hoLinks
	Send ComFitToClient
	Set ComAxisStyle to |CI$c0
	Set ComAxisColor to (RGB(128,128,128))
	Send ComEndUpdate
End_Procedure
124
Is is possible to show just the positive coordinates

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComCoord to (OLEexAllowPositiveOnly + OLEexCartesian)
	Set ComAxisColor to (RGB(128,128,128))
	Set ComAxisStyle to (OLEexLinesThick + OLEexLinesDot4)
	Set ComShowLinks to OLEexShowLinks
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>1" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>2" 164 64 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>3" 0 132 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 3 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 2 to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
	Send Destroy to hoLinks
	Send ComFitToClient
	Send ComEndUpdate
End_Procedure
123
Cartesian coordinates (positive coordinates are shown top-right to the origin)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComCoord to OLEexCartesian
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>1" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>2" 164 64 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>3" 0 132 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 3 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 2 to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 3 to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 1 to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
	Send Destroy to hoLinks
	Send ComFitToClient
	Send ComEndUpdate
End_Procedure
122
Default coordinates (positive coordinates are shown bottom-right to the origin)

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComCoord to OLEexDefCoord
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>1" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>2" 164 64 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>3" 0 132 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 3 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 2 to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 3 to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 1 to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
	Send Destroy to hoLinks
	Send ComFitToClient
	Send ComEndUpdate
End_Procedure
121
Is it possible to customize the path of the links orthogonally similar with Microsoft Visio tool

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowLinkControlPoint to (OLEexOrthoArrange + OLEexMiddleControlPoint + OLEexControlPoint + OLEexEndControlPoint + OLEexStartControlPoint)
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>1" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>2" 164 64 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>3" 0 132 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 3 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 2 to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 3 to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 1 to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
	Send Destroy to hoLinks
	Set ComZoom to 200
	Send ComFitToClient
	Send ComEndUpdate
End_Procedure
120
Does your control supports OLE Drag and Drop
// Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
Procedure OnComOLEDragDrop Variant   llData Integer   llEffect Short   llButton Short   llShift OLE_XPOS_PIXELS   llX OLE_YPOS_PIXELS   llY
	Forward Send OnComOLEDragDrop llData llEffect llButton llShift llX llY
	Showln llData
End_Procedure

// Occurs when the OLEDrag method is called.
Procedure OnComOLEStartDrag Variant   llData Integer   llAllowedEffects
	Forward Send OnComOLEStartDrag llData llAllowedEffects
	// Data.SetData("some data to drag")
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComOLEDropMode to OLEexOLEDropManual
	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 "Click the Element wait for .5 second until + cursor is shown, to start <b>OLE Drag and Drop</b>" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComCaptionSingleLine of hoElement to False
			Set ComAutoSize of hoElement to False
			Set ComWidth of hoElement to 256
			Set ComHeight of hoElement to 56
		Send Destroy to hoElement
	Send Destroy to hoElements
End_Procedure
119
Is it possible to disable customizing the path of a specified link

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowLinkControlPoint to (|CI$ffffffe0 + OLEexOrthoArrange + OLEexMiddleControlPoint + OLEexControlPoint + OLEexEndControlPoint + OLEexStartControlPoint)
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B" 164 64 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B" 0 132 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
				Variant voLink
		Get ComAdd of hoLinks vFrom vTo Nothing to voLink
		Handle hoLink
		Get Create (RefClass(cComLink)) to hoLink
		Set pvComObject of hoLink to voLink
			Set ComCustomPath of hoLink to "0.5,0.25,0.5,.75"
		Send Destroy to hoLink
Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 3 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 2 to vTo1
			Send Destroy to hoElements4
				Variant voLink1
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to voLink1
		Handle hoLink1
		Get Create (RefClass(cComLink)) to hoLink1
		Set pvComObject of hoLink1 to voLink1
			Set ComCustomPath of hoLink1 to "0.5,0.25,0.5,.75"
		Send Destroy to hoLink1
Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 3 to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 1 to vTo2
			Send Destroy to hoElements6
				Variant voLink2
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to voLink2
		Handle hoLink2
		Get Create (RefClass(cComLink)) to hoLink2
		Set pvComObject of hoLink2 to voLink2
			Set ComShowLinkType of hoLink2 to (OLEexLinkStraight + OLEexLinkDirect)
			Set ComStartPos of hoLink2 to OLELeftAlignment
			Set ComColor of hoLink2 to (RGB(128,128,128))
			Set ComAllowControlPoint of hoLink2 to OLEexNoControlPoint
		Send Destroy to hoLink2
	Send Destroy to hoLinks
	Set ComZoom to 200
	Send ComFitToClient
	Send ComEndUpdate
End_Procedure
118
How do I let user customizes the link's path

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowLinkControlPoint to (|CI$ffffffe0 + OLEexOrthoArrange + OLEexMiddleControlPoint + OLEexControlPoint + OLEexEndControlPoint + OLEexStartControlPoint)
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B" 164 64 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B" 0 132 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
				Variant voLink
		Get ComAdd of hoLinks vFrom vTo Nothing to voLink
		Handle hoLink
		Get Create (RefClass(cComLink)) to hoLink
		Set pvComObject of hoLink to voLink
			Set ComCustomPath of hoLink to "0.5,0.25,0.5,.75"
		Send Destroy to hoLink
Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 3 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 2 to vTo1
			Send Destroy to hoElements4
				Variant voLink1
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to voLink1
		Handle hoLink1
		Get Create (RefClass(cComLink)) to hoLink1
		Set pvComObject of hoLink1 to voLink1
			Set ComCustomPath of hoLink1 to "0.5,0.25,0.5,.75"
		Send Destroy to hoLink1
Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 3 to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 1 to vTo2
			Send Destroy to hoElements6
				Variant voLink2
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to voLink2
		Handle hoLink2
		Get Create (RefClass(cComLink)) to hoLink2
		Set pvComObject of hoLink2 to voLink2
			Set ComShowLinkType of hoLink2 to (OLEexLinkStraight + OLEexLinkDirect)
			Set ComStartPos of hoLink2 to OLELeftAlignment
		Send Destroy to hoLink2
	Send Destroy to hoLinks
	Set ComZoom to 200
	Send ComFitToClient
	Send ComEndUpdate
End_Procedure
117
How can I generate a picture/image/graph from my diagram
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 "Element A" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComID of hoElement to "A"
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element B" Nothing Nothing to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComID of hoElement1 to "B"
		Send Destroy to hoElement1
		Variant voElement2
		Get ComAdd of hoElements "Element C" Nothing Nothing to voElement2
		Handle hoElement2
		Get Create (RefClass(cComElement)) to hoElement2
		Set pvComObject of hoElement2 to voElement2
			Set ComID of hoElement2 to "C"
		Send Destroy to hoElement2
		Variant voElement3
		Get ComAdd of hoElements "Element D" Nothing Nothing to voElement3
		Handle hoElement3
		Get Create (RefClass(cComElement)) to hoElement3
		Set pvComObject of hoElement3 to voElement3
			Set ComID of hoElement3 to "D"
		Send Destroy to hoElement3
		Variant voElement4
		Get ComAdd of hoElements "Element E" Nothing Nothing to voElement4
		Handle hoElement4
		Get Create (RefClass(cComElement)) to hoElement4
		Set pvComObject of hoElement4 to voElement4
			Set ComID of hoElement4 to "E"
		Send Destroy to hoElement4
		Variant voElement5
		Get ComAdd of hoElements "Element E" Nothing Nothing to voElement5
		Handle hoElement5
		Get Create (RefClass(cComElement)) to hoElement5
		Set pvComObject of hoElement5 to voElement5
			Set ComID of hoElement5 to "F"
		Send Destroy to hoElement5
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 "A" to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 "B" to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 "A" to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 "C" to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 "B" to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 "D" to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
		Variant vFrom3
			Variant voElements7
			Get ComElements to voElements7
			Handle hoElements7
			Get Create (RefClass(cComElements)) to hoElements7
			Set pvComObject of hoElements7 to voElements7
				Get ComItem of hoElements7 "B" to vFrom3
			Send Destroy to hoElements7
Variant vTo3
			Variant voElements8
			Get ComElements to voElements8
			Handle hoElements8
			Get Create (RefClass(cComElements)) to hoElements8
			Set pvComObject of hoElements8 to voElements8
				Get ComItem of hoElements8 "C" to vTo3
			Send Destroy to hoElements8
		Get ComAdd of hoLinks vFrom3 vTo3 Nothing to Nothing
		Variant vFrom4
			Variant voElements9
			Get ComElements to voElements9
			Handle hoElements9
			Get Create (RefClass(cComElements)) to hoElements9
			Set pvComObject of hoElements9 to voElements9
				Get ComItem of hoElements9 "A" to vFrom4
			Send Destroy to hoElements9
Variant vTo4
			Variant voElements10
			Get ComElements to voElements10
			Handle hoElements10
			Get Create (RefClass(cComElements)) to hoElements10
			Set pvComObject of hoElements10 to voElements10
				Get ComItem of hoElements10 "E" to vTo4
			Send Destroy to hoElements10
		Get ComAdd of hoLinks vFrom4 vTo4 Nothing to Nothing
		Variant vFrom5
			Variant voElements11
			Get ComElements to voElements11
			Handle hoElements11
			Get Create (RefClass(cComElements)) to hoElements11
			Set pvComObject of hoElements11 to voElements11
				Get ComItem of hoElements11 "A" to vFrom5
			Send Destroy to hoElements11
Variant vTo5
			Variant voElements12
			Get ComElements to voElements12
			Handle hoElements12
			Get Create (RefClass(cComElements)) to hoElements12
			Set pvComObject of hoElements12 to voElements12
				Get ComItem of hoElements12 "F" to vTo5
			Send Destroy to hoElements12
		Get ComAdd of hoLinks vFrom5 vTo5 Nothing to Nothing
	Send Destroy to hoLinks
	Set ComDefArrange OLEexDefArrangeCompact to False
	Send ComArrange Nothing
	Variant var_CopyTo
	Get ComCopyTo "c:/temp/xtest.jpg" to var_CopyTo
	Showln "!!!check the file c:/temp/xtest.jpg!!!"
End_Procedure
116
How can I generate a picture/image/graph from my diagram
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 "Element A" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComID of hoElement to "A"
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element B" Nothing Nothing to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComID of hoElement1 to "B"
		Send Destroy to hoElement1
		Variant voElement2
		Get ComAdd of hoElements "Element C" Nothing Nothing to voElement2
		Handle hoElement2
		Get Create (RefClass(cComElement)) to hoElement2
		Set pvComObject of hoElement2 to voElement2
			Set ComID of hoElement2 to "C"
		Send Destroy to hoElement2
		Variant voElement3
		Get ComAdd of hoElements "Element D" Nothing Nothing to voElement3
		Handle hoElement3
		Get Create (RefClass(cComElement)) to hoElement3
		Set pvComObject of hoElement3 to voElement3
			Set ComID of hoElement3 to "D"
		Send Destroy to hoElement3
		Variant voElement4
		Get ComAdd of hoElements "Element E" Nothing Nothing to voElement4
		Handle hoElement4
		Get Create (RefClass(cComElement)) to hoElement4
		Set pvComObject of hoElement4 to voElement4
			Set ComID of hoElement4 to "E"
		Send Destroy to hoElement4
		Variant voElement5
		Get ComAdd of hoElements "Element E" Nothing Nothing to voElement5
		Handle hoElement5
		Get Create (RefClass(cComElement)) to hoElement5
		Set pvComObject of hoElement5 to voElement5
			Set ComID of hoElement5 to "F"
		Send Destroy to hoElement5
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 "A" to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 "B" to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 "A" to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 "C" to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 "B" to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 "D" to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
		Variant vFrom3
			Variant voElements7
			Get ComElements to voElements7
			Handle hoElements7
			Get Create (RefClass(cComElements)) to hoElements7
			Set pvComObject of hoElements7 to voElements7
				Get ComItem of hoElements7 "B" to vFrom3
			Send Destroy to hoElements7
Variant vTo3
			Variant voElements8
			Get ComElements to voElements8
			Handle hoElements8
			Get Create (RefClass(cComElements)) to hoElements8
			Set pvComObject of hoElements8 to voElements8
				Get ComItem of hoElements8 "C" to vTo3
			Send Destroy to hoElements8
		Get ComAdd of hoLinks vFrom3 vTo3 Nothing to Nothing
		Variant vFrom4
			Variant voElements9
			Get ComElements to voElements9
			Handle hoElements9
			Get Create (RefClass(cComElements)) to hoElements9
			Set pvComObject of hoElements9 to voElements9
				Get ComItem of hoElements9 "A" to vFrom4
			Send Destroy to hoElements9
Variant vTo4
			Variant voElements10
			Get ComElements to voElements10
			Handle hoElements10
			Get Create (RefClass(cComElements)) to hoElements10
			Set pvComObject of hoElements10 to voElements10
				Get ComItem of hoElements10 "E" to vTo4
			Send Destroy to hoElements10
		Get ComAdd of hoLinks vFrom4 vTo4 Nothing to Nothing
		Variant vFrom5
			Variant voElements11
			Get ComElements to voElements11
			Handle hoElements11
			Get Create (RefClass(cComElements)) to hoElements11
			Set pvComObject of hoElements11 to voElements11
				Get ComItem of hoElements11 "A" to vFrom5
			Send Destroy to hoElements11
Variant vTo5
			Variant voElements12
			Get ComElements to voElements12
			Handle hoElements12
			Get Create (RefClass(cComElements)) to hoElements12
			Set pvComObject of hoElements12 to voElements12
				Get ComItem of hoElements12 "F" to vTo5
			Send Destroy to hoElements12
		Get ComAdd of hoLinks vFrom5 vTo5 Nothing to Nothing
	Send Destroy to hoLinks
	Set ComDefArrange OLEexDefArrangeCompact to False
	Send ComArrange Nothing
	Handle hoPrint
	Get Create (RefClass(cComPrint)) to hoPrint // Import the 'ExPrint 1.0 Control Library' library
		Set ComPrintExt of hoPrint to (pvComObject(Self))
		Get ComCopyTo of hoPrint "c:/temp/xtest.jpg" to Nothing
	Send Destroy to hoPrint
	Showln "!!!check the file c:/temp/xtest.jpg!!!"
End_Procedure
115
How can I print the component
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
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B" 0 76 to Nothing
		Variant voElement
		Get ComAdd of hoElements "Element <sha ;;0>C" -76 32 to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComAutoSize of hoElement to False
			Set ComHeight of hoElement to 32
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element <sha ;;0>D" 76 32 to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComAutoSize of hoElement1 to False
			Set ComHeight of hoElement1 to 32
		Send Destroy to hoElement1
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
				Variant voLink
		Get ComAdd of hoLinks vFrom vTo Nothing to voLink
		Handle hoLink
		Get Create (RefClass(cComLink)) to hoLink
		Set pvComObject of hoLink to voLink
			Set ComStartPos of hoLink to OLECenterAlignment
			Set ComEndPos of hoLink to OLECenterAlignment
		Send Destroy to hoLink
Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 2 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 1 to vTo1
			Send Destroy to hoElements4
				Variant voLink1
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to voLink1
		Handle hoLink1
		Get Create (RefClass(cComLink)) to hoLink1
		Set pvComObject of hoLink1 to voLink1
			Set ComStartPos of hoLink1 to OLECenterAlignment
			Set ComEndPos of hoLink1 to OLECenterAlignment
		Send Destroy to hoLink1
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 3 to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 4 to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
Variant vFrom3
			Variant voElements7
			Get ComElements to voElements7
			Handle hoElements7
			Get Create (RefClass(cComElements)) to hoElements7
			Set pvComObject of hoElements7 to voElements7
				Get ComItem of hoElements7 4 to vFrom3
			Send Destroy to hoElements7
Variant vTo3
			Variant voElements8
			Get ComElements to voElements8
			Handle hoElements8
			Get Create (RefClass(cComElements)) to hoElements8
			Set pvComObject of hoElements8 to voElements8
				Get ComItem of hoElements8 3 to vTo3
			Send Destroy to hoElements8
				Variant voLink2
		Get ComAdd of hoLinks vFrom3 vTo3 Nothing to voLink2
		Handle hoLink2
		Get Create (RefClass(cComLink)) to hoLink2
		Set pvComObject of hoLink2 to voLink2
			Set ComStartPos of hoLink2 to OLELeftAlignment
			Set ComEndPos of hoLink2 to OLERightAlignment
		Send Destroy to hoLink2
	Send Destroy to hoLinks
	Handle hoPrint
	Get Create (RefClass(cComPrint)) to hoPrint // Import the 'ExPrint 1.0 Control Library' library
		Set ComPrintExt of hoPrint to (pvComObject(Self))
		Send ComPreview of hoPrint
	Send Destroy to hoPrint
End_Procedure
114
How can I show direct-links

Procedure OnCreate
	Forward Send OnCreate
	Set ComShowLinksType to OLEexLinkDirect
	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 "Element A" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComID of hoElement to "A"
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element B" 128 64 to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComID of hoElement1 to "B"
		Send Destroy to hoElement1
		Variant voElement2
		Get ComAdd of hoElements "Element C" 128 -64 to voElement2
		Handle hoElement2
		Get Create (RefClass(cComElement)) to hoElement2
		Set pvComObject of hoElement2 to voElement2
			Set ComID of hoElement2 to "C"
		Send Destroy to hoElement2
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 "A" to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 "B" to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 "A" to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 "C" to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
	Send Destroy to hoLinks
End_Procedure
113
How can I show straight-links

Procedure OnCreate
	Forward Send OnCreate
	Set ComShowLinksType to OLEexLinkStraight
	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 "Element A" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComID of hoElement to "A"
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element B" 128 64 to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComID of hoElement1 to "B"
		Send Destroy to hoElement1
		Variant voElement2
		Get ComAdd of hoElements "Element C" 128 -64 to voElement2
		Handle hoElement2
		Get Create (RefClass(cComElement)) to hoElement2
		Set pvComObject of hoElement2 to voElement2
			Set ComID of hoElement2 to "C"
		Send Destroy to hoElement2
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 "A" to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 "B" to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 "A" to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 "C" to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
	Send Destroy to hoLinks
End_Procedure
112
How can I show round-links

Procedure OnCreate
	Forward Send OnCreate
	Set ComShowLinksType to OLEexLinkRound
	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 "Element A" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComID of hoElement to "A"
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element B" 128 64 to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComID of hoElement1 to "B"
		Send Destroy to hoElement1
		Variant voElement2
		Get ComAdd of hoElements "Element C" 128 -64 to voElement2
		Handle hoElement2
		Get Create (RefClass(cComElement)) to hoElement2
		Set pvComObject of hoElement2 to voElement2
			Set ComID of hoElement2 to "C"
		Send Destroy to hoElement2
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 "A" to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 "B" to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 "A" to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 "C" to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
	Send Destroy to hoLinks
End_Procedure
111
I've tried to insert a "<br>" in the Caption property text and it just ignores it

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	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 "caption" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComCaptionSingleLine of hoElement to False
			Set ComCaption of hoElement to "first caption<br>second caption<br>third caption"
		Send Destroy to hoElement
	Send Destroy to hoElements
	Send ComEndUpdate
End_Procedure
110
How do I align the extra-caption

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	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 "caption" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComAutoSize of hoElement to False
			Set ComWidth of hoElement to 128
			Set ComHeight of hoElement to 64
			Set ComExtraCaption of hoElement to "extra-caption"
			Set ComExtraCaptionAlign of hoElement to OLEexBottomRight
		Send Destroy to hoElement
	Send Destroy to hoElements
	Send ComEndUpdate
End_Procedure
109
How can I add an extra caption

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	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 "caption" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComExtraCaption of hoElement to "extra-caption"
		Send Destroy to hoElement
	Send Destroy to hoElements
	Send ComEndUpdate
End_Procedure
108
I am using the reserve-neighbors feature, the question is how to shift left/right the neighbors instead of up/down
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowMoveNeighbors to OLEexMoveNeighborsHorizontally
	Set ComDefArrange OLEexDefArrangeDir to 1
	Set ComAllowInsertObject to False
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B ( move it )" 16 32 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>C" 128 0 to Nothing
	Send Destroy to hoElements
	Send ComEndUpdate
End_Procedure
107
I am using the reserve-neighbors feature, the question is if possible to specify the distance between neighbors
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowMoveNeighbors to OLEexMoveNeighborsVertically
	Set ComDefArrange OLEexDefArrangeDX to 0
	Set ComDefArrange OLEexDefArrangeDY to 0
	Set ComAllowInsertObject to False
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B ( move it )" 0 32 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>C" 0 64 to Nothing
	Send Destroy to hoElements
	Send ComEndUpdate
End_Procedure
106
How do I enable the reserve-neighbors feature
Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComAllowMoveNeighbors to OLEexMoveNeighborsVertically
	Set ComAllowInsertObject to False
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B ( move it )" 0 32 to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>C" 0 64 to Nothing
	Send Destroy to hoElements
	Send ComEndUpdate
End_Procedure
105
I've noticed that recently, the elements get compacted once the Arrange method is performed. How can I prevent that

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 "Element A" Nothing Nothing to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComID of hoElement to "A"
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element B" Nothing Nothing to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComID of hoElement1 to "B"
		Send Destroy to hoElement1
		Variant voElement2
		Get ComAdd of hoElements "Element C" Nothing Nothing to voElement2
		Handle hoElement2
		Get Create (RefClass(cComElement)) to hoElement2
		Set pvComObject of hoElement2 to voElement2
			Set ComID of hoElement2 to "C"
		Send Destroy to hoElement2
		Variant voElement3
		Get ComAdd of hoElements "Element D" Nothing Nothing to voElement3
		Handle hoElement3
		Get Create (RefClass(cComElement)) to hoElement3
		Set pvComObject of hoElement3 to voElement3
			Set ComID of hoElement3 to "D"
		Send Destroy to hoElement3
		Variant voElement4
		Get ComAdd of hoElements "Element E" Nothing Nothing to voElement4
		Handle hoElement4
		Get Create (RefClass(cComElement)) to hoElement4
		Set pvComObject of hoElement4 to voElement4
			Set ComID of hoElement4 to "E"
		Send Destroy to hoElement4
		Variant voElement5
		Get ComAdd of hoElements "Element E" Nothing Nothing to voElement5
		Handle hoElement5
		Get Create (RefClass(cComElement)) to hoElement5
		Set pvComObject of hoElement5 to voElement5
			Set ComID of hoElement5 to "F"
		Send Destroy to hoElement5
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 "A" to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 "B" to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
		Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 "A" to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 "C" to vTo1
			Send Destroy to hoElements4
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to Nothing
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 "B" to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 "D" to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
		Variant vFrom3
			Variant voElements7
			Get ComElements to voElements7
			Handle hoElements7
			Get Create (RefClass(cComElements)) to hoElements7
			Set pvComObject of hoElements7 to voElements7
				Get ComItem of hoElements7 "B" to vFrom3
			Send Destroy to hoElements7
Variant vTo3
			Variant voElements8
			Get ComElements to voElements8
			Handle hoElements8
			Get Create (RefClass(cComElements)) to hoElements8
			Set pvComObject of hoElements8 to voElements8
				Get ComItem of hoElements8 "C" to vTo3
			Send Destroy to hoElements8
		Get ComAdd of hoLinks vFrom3 vTo3 Nothing to Nothing
		Variant vFrom4
			Variant voElements9
			Get ComElements to voElements9
			Handle hoElements9
			Get Create (RefClass(cComElements)) to hoElements9
			Set pvComObject of hoElements9 to voElements9
				Get ComItem of hoElements9 "A" to vFrom4
			Send Destroy to hoElements9
Variant vTo4
			Variant voElements10
			Get ComElements to voElements10
			Handle hoElements10
			Get Create (RefClass(cComElements)) to hoElements10
			Set pvComObject of hoElements10 to voElements10
				Get ComItem of hoElements10 "E" to vTo4
			Send Destroy to hoElements10
		Get ComAdd of hoLinks vFrom4 vTo4 Nothing to Nothing
		Variant vFrom5
			Variant voElements11
			Get ComElements to voElements11
			Handle hoElements11
			Get Create (RefClass(cComElements)) to hoElements11
			Set pvComObject of hoElements11 to voElements11
				Get ComItem of hoElements11 "A" to vFrom5
			Send Destroy to hoElements11
Variant vTo5
			Variant voElements12
			Get ComElements to voElements12
			Handle hoElements12
			Get Create (RefClass(cComElements)) to hoElements12
			Set pvComObject of hoElements12 to voElements12
				Get ComItem of hoElements12 "F" to vTo5
			Send Destroy to hoElements12
		Get ComAdd of hoLinks vFrom5 vTo5 Nothing to Nothing
	Send Destroy to hoLinks
	Set ComDefArrange OLEexDefArrangeCompact to False
	Send ComArrange Nothing
End_Procedure
104
Is it possible to add a link to show from bottom/down to top/up, rather that right to left (method-2)

// A new link has been added to the links collection.
Procedure OnComAddLink Variant   llLink
	Forward Send OnComAddLink llLink
	Move to Link
End_Procedure

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
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B" 48 48 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
		Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
		Get ComAdd of hoLinks vFrom vTo Nothing to Nothing
	Send Destroy to hoLinks
End_Procedure
103
Is it possible to add a link to show from bottom/down to top/up, rather that right to left (method-1)

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
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B" 48 48 to Nothing
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
				Variant voLink
		Get ComAdd of hoLinks vFrom vTo Nothing to voLink
		Handle hoLink
		Get Create (RefClass(cComLink)) to hoLink
		Set pvComObject of hoLink to voLink
			Set ComStartPos of hoLink to OLEDownAlignment
			Set ComEndPos of hoLink to OLEUpAlignment
		Send Destroy to hoLink
	Send Destroy to hoLinks
End_Procedure
102
How do I enable the cross link support ( mixed )

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
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B" 0 76 to Nothing
		Variant voElement
		Get ComAdd of hoElements "Element <sha ;;0>C" -76 32 to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComAutoSize of hoElement to False
			Set ComHeight of hoElement to 32
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element <sha ;;0>D" 76 32 to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComAutoSize of hoElement1 to False
			Set ComHeight of hoElement1 to 32
		Send Destroy to hoElement1
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
				Variant voLink
		Get ComAdd of hoLinks vFrom vTo Nothing to voLink
		Handle hoLink
		Get Create (RefClass(cComLink)) to hoLink
		Set pvComObject of hoLink to voLink
			Set ComStartPos of hoLink to OLECenterAlignment
			Set ComEndPos of hoLink to OLECenterAlignment
		Send Destroy to hoLink
Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 2 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 1 to vTo1
			Send Destroy to hoElements4
				Variant voLink1
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to voLink1
		Handle hoLink1
		Get Create (RefClass(cComLink)) to hoLink1
		Set pvComObject of hoLink1 to voLink1
			Set ComStartPos of hoLink1 to OLECenterAlignment
			Set ComEndPos of hoLink1 to OLECenterAlignment
		Send Destroy to hoLink1
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 3 to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 4 to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
Variant vFrom3
			Variant voElements7
			Get ComElements to voElements7
			Handle hoElements7
			Get Create (RefClass(cComElements)) to hoElements7
			Set pvComObject of hoElements7 to voElements7
				Get ComItem of hoElements7 4 to vFrom3
			Send Destroy to hoElements7
Variant vTo3
			Variant voElements8
			Get ComElements to voElements8
			Handle hoElements8
			Get Create (RefClass(cComElements)) to hoElements8
			Set pvComObject of hoElements8 to voElements8
				Get ComItem of hoElements8 3 to vTo3
			Send Destroy to hoElements8
				Variant voLink2
		Get ComAdd of hoLinks vFrom3 vTo3 Nothing to voLink2
		Handle hoLink2
		Get Create (RefClass(cComLink)) to hoLink2
		Set pvComObject of hoLink2 to voLink2
			Set ComStartPos of hoLink2 to OLELeftAlignment
			Set ComEndPos of hoLink2 to OLERightAlignment
		Send Destroy to hoLink2
	Send Destroy to hoLinks
	Set ComShowLinks to (OLEexShowCrossLinksMixt + OLEexShowExtendedLinks)
End_Procedure
101
How do I enable the cross link support ( triangular )

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
		Get ComAdd of hoElements "Element <sha ;;0>A" Nothing Nothing to Nothing
		Get ComAdd of hoElements "Element <sha ;;0>B" 0 76 to Nothing
		Variant voElement
		Get ComAdd of hoElements "Element <sha ;;0>C" -76 32 to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComAutoSize of hoElement to False
			Set ComHeight of hoElement to 32
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element <sha ;;0>D" 76 32 to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComAutoSize of hoElement1 to False
			Set ComHeight of hoElement1 to 32
		Send Destroy to hoElement1
	Send Destroy to hoElements
	Variant voLinks
	Get ComLinks to voLinks
	Handle hoLinks
	Get Create (RefClass(cComLinks)) to hoLinks
	Set pvComObject of hoLinks to voLinks
Variant vFrom
			Variant voElements1
			Get ComElements to voElements1
			Handle hoElements1
			Get Create (RefClass(cComElements)) to hoElements1
			Set pvComObject of hoElements1 to voElements1
				Get ComItem of hoElements1 1 to vFrom
			Send Destroy to hoElements1
Variant vTo
			Variant voElements2
			Get ComElements to voElements2
			Handle hoElements2
			Get Create (RefClass(cComElements)) to hoElements2
			Set pvComObject of hoElements2 to voElements2
				Get ComItem of hoElements2 2 to vTo
			Send Destroy to hoElements2
				Variant voLink
		Get ComAdd of hoLinks vFrom vTo Nothing to voLink
		Handle hoLink
		Get Create (RefClass(cComLink)) to hoLink
		Set pvComObject of hoLink to voLink
			Set ComStartPos of hoLink to OLECenterAlignment
			Set ComEndPos of hoLink to OLECenterAlignment
		Send Destroy to hoLink
Variant vFrom1
			Variant voElements3
			Get ComElements to voElements3
			Handle hoElements3
			Get Create (RefClass(cComElements)) to hoElements3
			Set pvComObject of hoElements3 to voElements3
				Get ComItem of hoElements3 2 to vFrom1
			Send Destroy to hoElements3
Variant vTo1
			Variant voElements4
			Get ComElements to voElements4
			Handle hoElements4
			Get Create (RefClass(cComElements)) to hoElements4
			Set pvComObject of hoElements4 to voElements4
				Get ComItem of hoElements4 1 to vTo1
			Send Destroy to hoElements4
				Variant voLink1
		Get ComAdd of hoLinks vFrom1 vTo1 Nothing to voLink1
		Handle hoLink1
		Get Create (RefClass(cComLink)) to hoLink1
		Set pvComObject of hoLink1 to voLink1
			Set ComStartPos of hoLink1 to OLECenterAlignment
			Set ComEndPos of hoLink1 to OLECenterAlignment
		Send Destroy to hoLink1
		Variant vFrom2
			Variant voElements5
			Get ComElements to voElements5
			Handle hoElements5
			Get Create (RefClass(cComElements)) to hoElements5
			Set pvComObject of hoElements5 to voElements5
				Get ComItem of hoElements5 3 to vFrom2
			Send Destroy to hoElements5
Variant vTo2
			Variant voElements6
			Get ComElements to voElements6
			Handle hoElements6
			Get Create (RefClass(cComElements)) to hoElements6
			Set pvComObject of hoElements6 to voElements6
				Get ComItem of hoElements6 4 to vTo2
			Send Destroy to hoElements6
		Get ComAdd of hoLinks vFrom2 vTo2 Nothing to Nothing
Variant vFrom3
			Variant voElements7
			Get ComElements to voElements7
			Handle hoElements7
			Get Create (RefClass(cComElements)) to hoElements7
			Set pvComObject of hoElements7 to voElements7
				Get ComItem of hoElements7 4 to vFrom3
			Send Destroy to hoElements7
Variant vTo3
			Variant voElements8
			Get ComElements to voElements8
			Handle hoElements8
			Get Create (RefClass(cComElements)) to hoElements8
			Set pvComObject of hoElements8 to voElements8
				Get ComItem of hoElements8 3 to vTo3
			Send Destroy to hoElements8
				Variant voLink2
		Get ComAdd of hoLinks vFrom3 vTo3 Nothing to voLink2
		Handle hoLink2
		Get Create (RefClass(cComLink)) to hoLink2
		Set pvComObject of hoLink2 to voLink2
			Set ComStartPos of hoLink2 to OLELeftAlignment
			Set ComEndPos of hoLink2 to OLERightAlignment
		Send Destroy to hoLink2
	Send Destroy to hoLinks
	Set ComShowLinks to (OLEexShowCrossLinksTriangle + OLEexShowExtendedLinks)
End_Procedure