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

Name of shape

Glossary Item Box

Gets a shape.


Visual Basic (Declaration) 
Public Overridable Function GetShape( _
   ByVal name As String _
) As PSShape
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim name As String
Dim value As PSShape
value = instance.GetShape(name)
public virtual PSShape GetShape( 
   string name


Name of shape

Return Value

PSShape object containing the shape


This example changes the backcolor of the shape.
C#Copy Code
FarPoint.Win.Spread.DrawingSpace.ArrowShape arrow = new FarPoint.Win.Spread.DrawingSpace.ArrowShape();
arrow.Name = "MyArrow";
arrow.Parent = fpSpread1;
fpSpread1.ActiveSheet.AddShape(arrow, 3, 2);

private void button1_Click(object sender, System.EventArgs e)
FarPoint.Win.Spread.DrawingSpace.PSShape pss;
pss = fpSpread1.ActiveSheet.GetShape("MyArrow");
pss.BackColor = Color.Red;
Visual BasicCopy Code
Dim arrow As New FarPoint.Win.Spread.DrawingSpace.ArrowShape
arrow.Name = "MyArrow"
arrow.Parent = FpSpread1
FpSpread1.ActiveSheet.AddShape(arrow, 3, 2)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim pss As FarPoint.Win.Spread.DrawingSpace.PSShape
pss = FpSpread1.ActiveSheet.GetShape("MyArrow")
pss.BackColor = Color.Red
End Sub


Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also


SheetView Class
SheetView Members

User-Task Documentation

Working with Shapes

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