Spread Windows Forms 7.0 Product Documentation
Applying a Skin to a Sheet
Support Options
Spread Windows Forms 7.0 Product Documentation > Developer's Guide > Customizing the Sheet Appearance > Customizing the Individual Sheet Appearance > Applying a Skin to a Sheet

Glossary Item Box

You can quickly customize the appearance of a sheet by applying a "skin" to it. A skin is simply a collection of appearance properties that apply to an entire sheet such as colors, grid lines, and whether to show headers. This saves you the time and effort of setting the properties individually. Spread includes several built-in skins that are already made and ready for you to use. You can also create your own custom skin and save it so that you can use it in other Spread components for a common format.

For instructions on creating and applying your own sheet skins, see Creating a Custom Skin for a Sheet.

For instructions on creating and applying your own cell-level styles, see Creating and Applying a Style for Cells.

For instructions on saving the sheet skin to a file or stream, refer to Saving and Loading a Skin.

If you apply a skin to a sheet with a hierarchy of child sheets, be sure to apply the skin to the parent sheet as well as to each of the child sheets. For more information on hierarchical displays, refer to Working with Hierarchical Data Display.

For information on customizing a skin in the Spread Designer, refer to explanation of the SheetSkin editor in the Spread Designer Guide.

For more details about sheet skins, refer to the SheetSkin class.

Using the SheetSkin Editor

  1. If you want to create your own sheet skin, follow the instructions provided in Creating a Custom Skin for a Sheet to create a sheet skin and apply it. To apply a default sheet skin to a sheet, follow these directions.
  2. In the Form window, click the SheetView object for which you want to set the skin.
  3. At the bottom of the Properties window, click the Edit Skins verb.
  4. In the SheetSkin Editor, select one of the Pre-Defined skins in the list of predefined sheet skins, then click OK to close the editor.

Using a Shortcut

  1. If you want to create your own sheet skin, follow the instructions provided in Creating a Custom Skin for a Sheet to create a sheet skin and apply it. To apply a default sheet skin, follow these directions.
  2. Use the Apply method on the selected default skin (set by the property in the DefaultSkins object) to apply a specified default skin to a specific Spread component, collection of sheets, or sheet.

Example

This example code sets the first sheet to use the Colorful2 predefined skin.

C# Copy Code
FarPoint.Win.Spread.DefaultSkins.Colorful2.Apply(fpSpread1.Sheets[0]);
VB Copy Code
FarPoint.Win.Spread.DefaultSkins.Colorful2.Apply(FpSpread1.Sheets(0))

Using Code

  1. If you want to create your own sheet skin, follow the instructions provided in Creating a Custom Skin for a Sheet to create a sheet skin and apply it. To apply a default sheet skin, follow these directions.
  2. Use the Apply method on the selected default skin (set by the property in the DefaultSkins object) to apply a specified default skin to a specific Spread component, collection of sheets, or sheet.

Example

This example code sets the first sheet to use the Colorful2 predefined skin.

C# Copy Code
// Create new SheetView object.
FarPoint.Win.Spread.SheetView newsheet = new FarPoint.Win.Spread.SheetView();
// Apply a skin to the SheetView object.
FarPoint.Win.Spread.DefaultSkins.Colorful2.Apply(newsheet);
// Assign the SheetView object to the first sheet in the component.
fpSpread1.Sheets[0] = newsheet;
VB Copy Code
' Create new SheetView object.
Dim newsheet As New FarPoint.Win.Spread.SheetView()
' Apply a skin to the SheetView object.
FarPoint.Win.Spread.DefaultSkins.Colorful2.Apply(newsheet)
' Assign the SheetView object to the first sheet in the component.
FpSpread1.Sheets(0) = newsheet

Using the Spread Designer

  1. Select the sheet tab for the sheet for which you want to set the skin.
  2. From the Settings menu, choose Sheet Skin Designer.
  3. In the Sheet Skin Editor, select one of the predefined skins from the Pre-Defined tab, or a saved custom skin from the Saved tab.
  4. Click OK to close the editor.
  5. From the File menu choose Apply and Exit to apply your changes to the component and exit Spread Designer.
© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.