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


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

Parameters

shape
Shape to add
row
Row index at which to add shape
column
Column index at which to add shape

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 to the sheet at the specified row and column.
FarPoint.Win.Spread.DrawingSpace.ArrowShape arrow = new FarPoint.Win.Spread.DrawingSpace.ArrowShape();
arrow.Parent = fpSpread1;
fpSpread1.ActiveSheet.AddShape(arrow, 3, 2);
Dim arrow As New FarPoint.Win.Spread.DrawingSpace.ArrowShape
arrow.Parent = FpSpread1
FpSpread1.ActiveSheet.AddShape(arrow, 3, 2)
See Also

Reference

SheetView Class
SheetView Members
Overload List