Spread Windows Forms 11.0 Product Documentation
NamedStyleCollection Constructor()
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > NamedStyleCollection Class > NamedStyleCollection Constructor : NamedStyleCollection Constructor()
Creates a style collection (NamedStyleCollection object).
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New NamedStyleCollection()
public NamedStyleCollection()
Example
This example constructs a SheetView, adds it to the collection and applies it to the spreadsheet.
FarPoint.Win.Spread.Model.DefaultSheetDataModel dm = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(4, 4);
FarPoint.Win.Spread.NamedStyleCollection nsc = new FarPoint.Win.Spread.NamedStyleCollection();
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle();
nsc.Add(ns);
FarPoint.Win.Spread.SheetView sv = new FarPoint.Win.Spread.SheetView(dm, nsc);
fpSpread1.Sheets.Add(sv);
fpSpread1.ActiveSheet = sv;
Dim dm As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(4, 4)
Dim nsc As New FarPoint.Win.Spread.NamedStyleCollection()
Dim ns As New FarPoint.Win.Spread.NamedStyle()
nsc.Add(ns)
Dim sv As New FarPoint.Win.Spread.SheetView(dm, nsc)
FpSpread1.Sheets.Add(sv)
FpSpread1.ActiveSheet = sv
See Also

Reference

NamedStyleCollection Class
NamedStyleCollection Members
Overload List