
| Type | Description | |||
| Variant |
A VARIANT expression that specifies the object (Element, Link, Pool, Lane, or Phase) being moved or resized during the LayoutStartChanging or LayoutEndChanging events. Returns an empty or null value outside these events.
The following table provides a summary of the possible object types that can be returned by the LayoutChangingObject property:
|
The following VB sample demonstrates how to use the LayoutChangingObject property within the LayoutStartChanging event to identify and respond to the object being manipulated:
Private Sub SwimLane1_LayoutStartChanging(ByVal Operation As EXSWIMLANELibCtl.LayoutChangingEnum)
With SwimLane1
If Not IsEmpty(.LayoutChangingObject) Then
Debug.Print "Start " & Operation & " " & TypeName(.LayoutChangingObject)
End If
End With
End Sub
The following VB sample demonstrates how to use the LayoutChangingObject property within the LayoutEndChanging event to change the background color of an element being moved:
Private Sub SwimLane1_LayoutEndChanging(ByVal Operation As EXSWIMLANELibCtl.LayoutChangingEnum)
With SwimLane1
If Not IsEmpty(.LayoutChangingObject) Then
If (Operation = exResizeElement) Then
.LayoutChangingObject.BackColor = vbRed
End If
End If
End With
End Sub
The following VB sample demonstrates how to use the LayoutChangingObject property within the LayoutEndChanging event to change the background color of a lane being moved or resized:
Private Sub SwimLane1_LayoutEndChanging(ByVal Operation As EXSWIMLANELibCtl.LayoutChangingEnum)
With SwimLane1
If TypeOf .LayoutChangingObject Is EXSWIMLANELibCtl.ILane Then
.LayoutChangingObject.Color = vbRed
End If
End With
End Sub
The following C# sample demonstrates how to use the LayoutChangingObject property within the LayoutEndChanging event to change the background color of an element being moved or resized:
private void exswimlane1_LayoutEndChanging(object sender, exontrol.EXSWIMLANELib.LayoutChangingEnum Operation)
{
if (exswimlane1.LayoutChangingObject != null)
{
if (exswimlane1.LayoutChangingObject.GetType() == typeof(exontrol.EXSWIMLANELib.Element))
{
exontrol.EXSWIMLANELib.Element e = (exontrol.EXSWIMLANELib.Element)exswimlane1.LayoutChangingObject;
e.BackColor = Color.Red;
}
}
}
The following VB.NET sample demonstrates how to use the LayoutChangingObject property within the LayoutEndChanging event to change the background color of an element being moved or resized:
Private Sub Exswimlane1_LayoutEndChanging(ByVal sender As Object, ByVal Operation As exontrol.EXSWIMLANELib.LayoutChangingEnum) Handles Exswimlane1.LayoutEndChanging
If TypeOf Exswimlane1.LayoutChangingObject Is exontrol.EXSWIMLANELib.Element Then
Dim element As exontrol.EXSWIMLANELib.Element = CType(Exswimlane1.LayoutChangingObject, exontrol.EXSWIMLANELib.Element)
element.BackColor = Color.Red
End If
End Sub