Gets or sets the background of the preview row information.
Syntax
Visual Basic (Declaration) | |
---|
Public Property Background As Background |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As PreviewRowInfo
Dim value As Background
instance.Background = value
value = instance.Background |
Example
This example customizes the appearance of the preview row.
C# | Copy Code |
---|
// Add this style definition inside the STYLE element in the Default.aspx page.
.previewer
{
border-style:dashed;
border-color:Green;
border-width:thick;
font-family:Arial;
font-style:italic;
color:Blue;
background-color:Yellow;
text-align:right;
text-decoration:'underline'|'overline'|'line-through'|'blink';
vertical-align:bottom;
}
// Define the background.
FarPoint.Web.Spread.Background bg = new FarPoint.Web.Spread.Background();
bg.SelectedBackgroundImageUrl = "picture/Winter.jpg";
bg.BackgroundImageUrl = "picture/Image.bmp";
FarPoint.Web.Spread.Border bd1 = new FarPoint.Web.Spread.Border();
bd1.BorderColor = System.Drawing.Color.Blue;
bd1.BorderStyle = System.Web.UI.WebControls.BorderStyle.Dashed;
// Set the preview row properties.
FarPoint.Web.Spread.PreviewRowInfo previewRowInfo = new FarPoint.Web.Spread.PreviewRowInfo();
previewRowInfo.BackColor = Color.Blue;
previewRowInfo.Background = bg;
previewRowInfo.Border = bd1;
previewRowInfo.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center;
previewRowInfo.VerticalAlign = System.Web.UI.WebControls.VerticalAlign.Middle;
previewRowInfo.TabStop = true;
previewRowInfo.Margin.Bottom = 10;
previewRowInfo.Margin.Left = 10;
previewRowInfo.Margin.Right = 10;
previewRowInfo.Margin.Top = 10;
previewRowInfo.ForeColor = System.Drawing.Color.Green;
previewRowInfo.CssClass = "previewer"; // If set to previewer, other setting have no effect.
previewRowInfo.Font.Bold = true;
previewRowInfo.Font.Italic = true;
previewRowInfo.Font.Overline = true;
previewRowInfo.Font.Size = 20;
previewRowInfo.Font.Underline = true;
previewRowInfo.Font.Strikeout = true;
previewRowInfo.Font.Name = "Verdana"; // Try with some other name of font.
ListBox1.Items.Add(previewRowInfo.IsEmpty.ToString());
ListBox1.Items.Add(previewRowInfo.CanSerializeXml.ToString());
// Use the preview row.
FpSpread1.ActiveSheetView.PreviewRowColumnIndex = 0;
FpSpread1.ActiveSheetView.PreviewRowStyle = previewRowInfo;
FpSpread1.ActiveSheetView.PreviewRowVisible = true;
|
Visual Basic | Copy Code |
---|
' Add this style definition inside the STYLE element in the Default.aspx page.
.previewer
{
border-style:dashed;
border-color:Green;
border-width:thick;
font-family:Arial;
font-style:italic;
color:Blue;
background-color:Yellow;
text-align:right;
text-decoration:'underline'|'overline'|'line-through'|'blink';
vertical-align:bottom;
}
' Define the background.
Dim bg As New FarPoint.Web.Spread.Background()
bg.SelectedBackgroundImageUrl = "picture/Winter.jpg"
bg.BackgroundImageUrl = "picture/Image.bmp"
Dim bd1 As New FarPoint.Web.Spread.Border()
bd1.BorderColor = System.Drawing.Color.Blue
bd1.BorderStyle = System.Web.UI.WebControls.BorderStyle.Dashed
' Set the preview row properties.
Dim previewRowInfo As New FarPoint.Web.Spread.PreviewRowInfo()
previewRowInfo.BackColor = Color.Blue
previewRowInfo.Background = bg
previewRowInfo.Border = bd1
previewRowInfo.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center
previewRowInfo.VerticalAlign = System.Web.UI.WebControls.VerticalAlign.Middle
previewRowInfo.TabStop = True
previewRowInfo.Margin.Bottom = 10
previewRowInfo.Margin.Left = 10
previewRowInfo.Margin.Right = 10
previewRowInfo.Margin.Top = 10
previewRowInfo.ForeColor = System.Drawing.Color.Green
previewRowInfo.CssClass = "previewer" ' If set to previewer, other setting have no effect.
previewRowInfo.Font.Bold = True
previewRowInfo.Font.Italic = True
previewRowInfo.Font.Overline = True
previewRowInfo.Font.Size = 20
previewRowInfo.Font.Underline = True
previewRowInfo.Font.Strikeout = True
previewRowInfo.Font.Name = "Verdana" ' Try with some other name of font.
ListBox1.Items.Add(previewRowInfo.IsEmpty.ToString())
ListBox1.Items.Add(previewRowInfo.CanSerializeXml.ToString())
' Use the preview row.
FpSpread1.ActiveSheetView.PreviewRowColumnIndex = 0
FpSpread1.ActiveSheetView.PreviewRowStyle = previewRowInfo
FpSpread1.ActiveSheetView.PreviewRowVisible = True
|
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also