You can customize the background color of the data area of the sheet. The sheet background color is displayed as the cell background color, unless you set specific cell colors (as explained in Customizing the Colors of a Cell). It is also the color in the rest of the sheet where cells are not displayed (empty area), as shown in the following figure, where the background color is set to light yellow.
The background color for the sheet can be set either with the BackColor property of the sheet (SheetView class) or the BackColor property of the SheetSkin class and the skin applied to the sheet.
Return to the sheet appearance overview at Customizing the Appearance of the Sheet.
Using the Properties Window
- At design time, in the Properties window, select the Sheets property for the FpSpread component.
- Click the button to display the SheetView Collection Editor.
- In the Members list, select the sheet for which to set the background color.
- Select the BackColor property in the property list, and then click the drop-down button to display the color picker.
- Select a color in the color picker.
- Click OK to close the editor.
Using a Shortcut
Set the BackColor property of the FpSpread component Sheets shortcut.
Example
This example code sets the background color of the first sheet to light yellow.
C# | Copy Code |
---|---|
// Set the first sheet's background color to light yellow.
FpSpread1.Sheets[0].BackColor = Color.LightYellow;
|
VB | Copy Code |
---|---|
' Set the first sheet's background color to light yellow.
FpSpread1.Sheets(0).BackColor = Color.LightYellow
|
Using the Spread Designer
- From the sheets displayed at the bottom, select the sheet for which you want to set the background color.
- Select the BackColor property in the property list.
- Click the drop-down arrow to display the color picker.
- Select a color from the color picker.
- Click Apply and Exit to close the Spread Designer.