Spread Windows Forms 6.0 Product Documentation
BackgroundImage Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > RichTextCellType Class : BackgroundImage Property


Glossary Item Box

Gets or sets the background image for the cell.

Syntax

Visual Basic (Declaration) 
Public Overridable Property BackgroundImage As Picture
Visual Basic (Usage)Copy Code
Dim instance As RichTextCellType
Dim value As Picture
 
instance.BackgroundImage = value
 
value = instance.BackgroundImage
C# 
public virtual Picture BackgroundImage {get; set;}

Property Value

Picture object containing the image

Example

This example sets the picture for the progress indicator cell when the style is set to display a picture.
C#Copy Code
FarPoint.Win.Spread.CellType.RichTextCellType rtf = new FarPoint.Win.Spread.CellType.RichTextCellType(); 
rtf.BackgroundImage = new FarPoint.Win.Picture(Image.FromFile("c:\\fplogosm.bmp")); 
bool b; 
rtf.Static = false; 
fpSpread1.ActiveSheet.Cells[0, 0].CellType = rtf; 
fpSpread1.ActiveSheet.Cells[0, 0].Text = @"{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fswiss\\fcharset0Arial;}}{\\colortbl ;\\red255\\green0\\blue0;\\red255\\green0\\blue255;\\red128\\green0\\blue0;\\red0\\green0\\blue0;}{\\*\\generator
Msftedit 5.41.15.1507;}\\viewkind4\\uc1\\pard\\cf1\\f0\\fs20 This \\cf2 is \\cf3 RTF \\cf4\\b Test.\\cf0\\b0\\par}"; 
b = rtf.IsFormulaValue; 
MessageBox.Show(b.ToString());
Visual BasicCopy Code
Dim rtf As New FarPoint.Win.Spread.CellType.RichTextCellType
rtf.BackgroundImage = New FarPoint.Win.Picture(Image.FromFile("c:\fplogosm.bmp"))
Dim b As Boolean
rtf.Static = False
FpSpread1.ActiveSheet.Cells(0, 0).CellType = rtf
FpSpread1.ActiveSheet.Cells(0, 0).Text = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}{\colortbl
;\red255\green0\blue0;\red255\green0\blue255;\red128\green0\blue0;\red0\green0\blue0;}{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\cf1\f0\fs20
This \cf2 is \cf3 RTF \cf4\b Test.\cf0\b0\par}"
b = rtf.IsFormulaValue
MessageBox.Show(b.ToString())

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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