private void Form1_Load(object sender, System.EventArgs e)
{
FarPoint.Win.Spread.DrawingSpace.RectangleShape rShape = new FarPoint.Win.Spread.DrawingSpace.RectangleShape();
// Assign a name, overriding the unique default assigned name.
rShape.Name = "myRect1";
// Assign a location at which to start the display of the shape.
rShape.Top = 20;
rShape.Left = 60;
// Assign a custom fill color to the shape.
rShape.BackColor = Color.Blue;
// Assign a size to the shape.
rShape.Width = 100;
rShape.Height = 100;
// Add the shape to the sheet so that it appears on that sheet.
fpSpread1.ActiveSheet.AddShape(rShape);
}
private void fpSpread1_ShapeActivated(object sender, System.EventArgs e)
{
textBox1.Text = "Shape Activated";
}
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim rShape As New FarPoint.Win.Spread.DrawingSpace.RectangleShape
' Assign a name, overriding the unique default assigned name.
rShape.Name = "myRect1"
' Assign a location at which to start the display of the shape.
rShape.Top = 20
rShape.Left = 60
' Assign a custom fill color to the shape.
rShape.BackColor = Color.Blue
' Assign a size to the shape.
rShape.Width = 100
rShape.Height = 100
' Add the shape to the sheet so that it appears on that sheet.
FpSpread1.ActiveSheet.AddShape(rShape)
End Sub
Private Sub FpSpread1_ShapeActivated(ByVal sender As Object, ByVal e As System.EventArgs) Handles FpSpread1.ShapeActivated
TextBox1.Text = "Shape Activated"
End Sub