PowerTools SPREAD for ASP.NET 8.0J
Font プロパティ (PreviewRowInfo)

プレビュー行情報のフォント設定を取得または設定します。
構文
'Declaration
 
Public Property Font As FontInfo
public FontInfo Font {get; set;}

プロパティ値

フォント情報を含むFontInfoオブジェクト
次のサンプルコードは、プレビュー行の外観をカスタマイズします。
// Add this style definition inside the STYLE element in the *.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;
// If set to previewer, other setting have no effect.
previewRowInfo.CssClass = "previewer";

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";
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;
' 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
' If set to previewer, other setting have no effect.
previewRowInfo.CssClass = "previewer"

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"
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
参照

PreviewRowInfo クラス
PreviewRowInfo メンバ

 

 


© 2003-2015, GrapeCity inc. All rights reserved.