Spread Windows Forms 6.0 Product Documentation
JoinShapes Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : JoinShapes Method


destinationShapeName
Name of destination shape for merge
sourceShapeName
Name of source shape for merge

Glossary Item Box

Joins two shapes in the drawing container for the sheet.

Syntax

Visual Basic (Declaration) 
Public Overridable Function JoinShapes( _
   ByVal destinationShapeName As String, _
   ByVal sourceShapeName As String _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim destinationShapeName As String
Dim sourceShapeName As String
Dim value As Boolean
 
value = instance.JoinShapes(destinationShapeName, sourceShapeName)
C# 
public virtual bool JoinShapes( 
   string destinationShapeName,
   string sourceShapeName
)

Parameters

destinationShapeName
Name of destination shape for merge
sourceShapeName
Name of source shape for merge

Example

This example joins two shapes in the drawing space.
C#Copy Code
FarPoint.Win.Spread.DrawingSpace.ArrowShape a = new FarPoint.Win.Spread.DrawingSpace.ArrowShape();
a.CanMove = FarPoint.Win.Spread.DrawingSpace.Moving.HorizontalAndVertical;
a.Name = "Arrow";
fpSpread1.ActiveSheet.AddShape(a);
FarPoint.Win.Spread.DrawingSpace.RectangleShape r = new FarPoint.Win.Spread.DrawingSpace.RectangleShape();
r.CanMove = FarPoint.Win.Spread.DrawingSpace.Moving.HorizontalAndVertical;
r.Name = "Rect";
fpSpread1.ActiveSheet.AddShape(r);

private void Button1_Click(object sender, System.EventArgs e) 
{
fpSpread1.ActiveSheet.JoinShapes("Rect", "Arrow");
}
Visual BasicCopy Code
Dim a As New FarPoint.Win.Spread.DrawingSpace.ArrowShape
a.CanMove = FarPoint.Win.Spread.DrawingSpace.Moving.HorizontalAndVertical
a.Name = "Arrow"
FpSpread1.ActiveSheet.AddShape(a)
Dim r As New FarPoint.Win.Spread.DrawingSpace.RectangleShape
r.CanMove = FarPoint.Win.Spread.DrawingSpace.Moving.HorizontalAndVertical
r.Name = "Rect"
FpSpread1.ActiveSheet.AddShape(r)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FpSpread1.ActiveSheet.JoinShapes("Rect", "Arrow")
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.