Spread Windows Forms 6.0 Product Documentation
SpreadCameraShape Constructor(SheetView,CellRange)
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.DrawingSpace Namespace > SpreadCameraShape Class > SpreadCameraShape Constructor : SpreadCameraShape Constructor(SheetView,CellRange)


sheetView
The sheetView that contains the captured region
cellRange
The captured region of the sheetView

Glossary Item Box

Create a new SpreadCameraShape object

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal sheetView As SheetView, _
   ByVal cellRange As CellRange _
)
Visual Basic (Usage)Copy Code
Dim sheetView As SheetView
Dim cellRange As CellRange
 
Dim instance As New SpreadCameraShape(sheetView, cellRange)
C# 
public SpreadCameraShape( 
   SheetView sheetView,
   CellRange cellRange
)

Parameters

sheetView
The sheetView that contains the captured region
cellRange
The captured region of the sheetView

Example

This example creates a shape from a cell range.
C#Copy Code
FarPoint.Win.Spread.SheetView newsheet = new FarPoint.Win.Spread.SheetView();
newsheet.ColumnCount = 10;
newsheet.RowCount = 10;
newsheet.Cells[0, 0].BackColor = Color.Aqua;
newsheet.Cells[0, 0].Text = "test";
fpSpread1.Sheets[0] = newsheet;

FarPoint.Win.Spread.Model.CellRange range1 = new FarPoint.Win.Spread.Model.CellRange(0, 0, 3, 1);
FarPoint.Win.Spread.DrawingSpace.SpreadCameraShape test = new FarPoint.Win.Spread.DrawingSpace.SpreadCameraShape(newsheet, range1);
fpSpread1.Sheets[0].AddShape(test, 2, 2);
Visual BasicCopy Code
Dim newsheet As New FarPoint.Win.Spread.SheetView()
newsheet.ColumnCount = 10
newsheet.RowCount = 10
newsheet.Cells(0, 0).BackColor = Color.Aqua
newsheet.Cells(0, 0).Text = "test"
FpSpread1.Sheets(0) = newsheet

Dim range1 As New FarPoint.Win.Spread.Model.CellRange(0, 0, 3, 1)
Dim test As New FarPoint.Win.Spread.DrawingSpace.SpreadCameraShape(newsheet, range1)
FpSpread1.Sheets(0).AddShape(test, 2, 2)

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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