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

Shape to add

Glossary Item Box

Adds a shape to the drawing container for the sheet.


Visual Basic (Declaration) 
Public Overloads Overridable Function AddShape( _
   ByVal shape As PSShape _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim shape As PSShape
Dim value As Integer
value = instance.AddShape(shape)
public virtual int AddShape( 
   PSShape shape


Shape to add

Return Value

Integer index of the shape in the list of shapes


The index of the shape is the number in the shapes list that the shape was added. If you add a shape by the same name as a shape already in the container, the return value is the index of the replaced shape.


This example adds a shape on the sheet.
C#Copy Code
FarPoint.Win.Spread.DrawingSpace.ArrowShape a = new FarPoint.Win.Spread.DrawingSpace.ArrowShape();
Visual BasicCopy Code
Dim a As New FarPoint.Win.Spread.DrawingSpace.ArrowShape


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.