You can change several properties of a shape using the Spread Designer or code.
Return to the overview of Things To Do with Any Shape.
To change the appearance of a shape using the Spread Designer, refer to the Insert Menu and the Shape Properties dialog in Shape Properties Dialog.
To change the appearance of a shape using code, set the properties of a shape object as illustrated in this example. Refer to the FarPoint.Win.Spread.DrawingSpace namespace and select the particular shape and define its properties using code. Here is an example of an arrow shape with its outline color and background color being set. The example also sets the size and placement of the shape with the SetBounds property.
Example
C# | Copy Code |
---|---|
// Add arrow shape with its outline color and background color set. FarPoint.Win.Spread.DrawingSpace.ArrowShape arrow = new FarPoint.Win.Spread.DrawingSpace.ArrowShape(); arrow.BackColor = Color.Plum; arrow.ForeColor = Color.Pink; arrow.SetBounds(0,0,200,100); fpSpread1.ActiveSheet.AddShape(arrow); |
VB | Copy Code |
---|---|
‘ Add arrow shape with its outline color and background color set. Dim arrow As New FarPoint.Win.Spread.DrawingSpace.ArrowShape() arrow.BackColor = Color.Plum arrow.ForeColor = Color.Pink arrow.SetBounds(0,0,200,100) fpSpread1.ActiveSheet.AddShape(arrow) |