Spread Windows Forms 6.0 Product Documentation
Setting a Background Image for a Sheet
Support Options
Spread Windows Forms 6.0 Product Documentation > Developer's Guide > Customizing the Sheet Appearance > Customizing the Individual Sheet Appearance > Setting a Background Image for a Sheet

Glossary Item Box

You can set an image in the background of the cells in the data area of the sheet. Depending on the size of the graphic and the size of the spreadsheet, the image may be repeated (tiled) over the entire sheet of cells.

Sheet Background Image Example

For more information on setting an image in an individual cell, refer to Setting a Background Image to a Cell.

For more information on the image cell type, refer to Setting an Image Cell.

Return to Customizing the Individual Sheet Appearance.

Example

C# Copy Code
private void Form1_Load(object sender, System.EventArgs e)
 
{
 
   
 
   //Specify background images.
 
   fpSpread1.BackgroundImage = Image.FromFile("D:\\images\\butterfly.gif");
 
   
 
   //Set "Transparent" to the default background color of the sheet.
 
   fpSpread1.ActiveSheet.DefaultStyle.BackColor = Color.Transparent;
 
   
 
} 
VB Copy Code
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
   
 
   'Specify background images.
 
   FpSpread1.BackgroundImage = Image.FromFile("D:\images\butterfly.gif")
 
   
 
   'Set "Transparent" to the default background color of the sheet.
 
   FpSpread1.ActiveSheet.DefaultStyle.BackColor = Color.Transparent
 
End Sub 

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