You can create a snapshot of a range of cells and use that as a shape in the Spread control. The cell range can contain other shapes including charts. The following image displays a camera shape that contains a chart.
For more information about using the Spread Designer to add camera shapes, see the Insert Menu topic. In general, properties that apply to the interior of the shape, do not apply to the camera shape.
This example creates a blue triangle, adds text to a cell, and creates a camera shape that includes both.
C# |
Copy Code
|
---|---|
fpSpread1.Sheets[0].Cells[1, 3].Text = "Test"; FarPoint.Win.Spread.DrawingSpace.TriangleShape a = new FarPoint.Win.Spread.DrawingSpace.TriangleShape(); a.BackColor = Color.Blue; fpSpread1.ActiveSheet.AddShape(a, 1, 1); FarPoint.Win.Spread.DrawingSpace.SpreadCameraShape test = new FarPoint.Win.Spread.DrawingSpace.SpreadCameraShape(); test.Formula = "B1:D6"; test.Location = new System.Drawing.Point(20, 20); fpSpread1.Sheets[0].AddShape(test); |
VB |
Copy Code
|
---|---|
fpSpread1.Sheets(0).Cells(1, 3).Text = "Test" Dim a As New FarPoint.Win.Spread.DrawingSpace.TriangleShape a.BackColor = Color.Blue fpSpread1.ActiveSheet.AddShape(a, 1, 1) Dim test As New FarPoint.Win.Spread.DrawingSpace.SpreadCameraShape() test.Formula = "B1:D6" test.Location = New System.Drawing.Point(20, 20) fpSpread1.Sheets(0).AddShape(test) |
The following image displays a camera shape that contains a triangle shape and a cell with text.