Spread Windows Forms 11.0 Product Documentation
PercentCellType Constructor(PercentCellType)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > PercentCellType Class > PercentCellType Constructor : PercentCellType Constructor(PercentCellType)
Specified percent cell type from which to copy
Creates a new copy from the specified cell type ("Copy constructor").
Syntax
'Declaration
 
Public Function New( _
   ByVal g As PercentCellType _
)
'Usage
 
Dim g As PercentCellType
 
Dim instance As New PercentCellType(g)
public PercentCellType( 
   PercentCellType g
)

Parameters

g
Specified percent cell type from which to copy
Example
This example creates a percent cell.
FarPoint.Win.Spread.CellType.PercentCellType prctcell = new FarPoint.Win.Spread.CellType.PercentCellType();
object o;
o = "20";
prctcell.Format(o);
prctcell.PositiveFormat = FarPoint.Win.Spread.CellType.PercentPositiveFormat.PercentAfter;
prctcell.PercentSign = "P";
fpSpread1.ActiveSheet.Cells[0, 0].CellType = prctcell;
fpSpread1.ActiveSheet.Cells[0, 0].Value = o;
FarPoint.Win.Spread.CellType.PercentCellType percent = new FarPoint.Win.Spread.CellType.PercentCellType(prctcell);
fpSpread1.ActiveSheet.Cells[0, 1].CellType = percent;
fpSpread1.ActiveSheet.Cells[0, 1].Value = o;
Dim prctcell As New FarPoint.Win.Spread.CellType.PercentCellType()
Dim o As object
o = "20"
prctcell.Format(o)
prctcell.PositiveFormat = FarPoint.Win.Spread.CellType.PercentPositiveFormat.PercentAfter
prctcell.PercentSign = "P"
fpSpread1.ActiveSheet.Cells(0, 0).CellType = prctcell
fpSpread1.ActiveSheet.Cells(0, 0).Value = o
Dim percent As New FarPoint.Win.Spread.CellType.PercentCellType(prctcell)
fpSpread1.ActiveSheet.Cells(0, 1).CellType = percent
fpSpread1.ActiveSheet.Cells(0, 1).Value = o
See Also

Reference

PercentCellType Class
PercentCellType Members
Overload List