Spread Windows Forms 11.0 Product Documentation
AddShape(PSShape) Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class > AddShape Method : AddShape(PSShape) Method
Shape to add
Adds a shape to the drawing container for the sheet.
Syntax
'Declaration
 
Public Overloads Overridable Function AddShape( _
   ByVal shape As PSShape _
) As Integer
'Usage
 
Dim instance As SheetView
Dim shape As PSShape
Dim value As Integer
 
value = instance.AddShape(shape)
public virtual int AddShape( 
   PSShape shape
)

Parameters

shape
Shape to add

Return Value

Integer index of the shape in the list of shapes
Remarks
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.
Example
This example adds a shape on the sheet.
FarPoint.Win.Spread.DrawingSpace.ArrowShape a = new FarPoint.Win.Spread.DrawingSpace.ArrowShape();
fpSpread1.ActiveSheet.AddShape(a);
Dim a As New FarPoint.Win.Spread.DrawingSpace.ArrowShape
FpSpread1.ActiveSheet.AddShape(a)
See Also

Reference

SheetView Class
SheetView Members
Overload List