作成日: 2017/06/15 最終更新日: 2017/06/15
文書種別
使用方法
詳細
以下のようにCssClassを利用することでコマンドボタン型セルのフォントを設定することができます。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
------------------------
Webフォームクラス
------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack Then
Return
End If
Dim bc As New FarPoint.Web.Spread.ButtonCellType()
bc.Text = "ボタン"
bc.CssClass = "CssStyle1"
bc.CommandName = "test1"
FpSpread1.ActiveSheetView.Cells(1, 0).CellType = bc
End Sub
-------------------------------
HTML
-------------------------------
<style type="text/css">
.CssStyle1 { font: bold large "MS 明朝"; }
</style>
Webフォームクラス
------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack Then
Return
End If
Dim bc As New FarPoint.Web.Spread.ButtonCellType()
bc.Text = "ボタン"
bc.CssClass = "CssStyle1"
bc.CommandName = "test1"
FpSpread1.ActiveSheetView.Cells(1, 0).CellType = bc
End Sub
-------------------------------
HTML
-------------------------------
<style type="text/css">
.CssStyle1 { font: bold large "MS 明朝"; }
</style>
◎サンプルコード(C#)
------------------------
Webフォームクラス
------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
return;
}
FarPoint.Web.Spread.ButtonCellType bc = new FarPoint.Web.Spread.ButtonCellType();
bc.Text = "ボタン";
bc.CssClass = "CssStyle1";
bc.CommandName = "test1";
FpSpread1.ActiveSheetView.Cells[1, 0].CellType = bc;
}
-------------------------------
HTML
-------------------------------
※VBと同じです
Webフォームクラス
------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
return;
}
FarPoint.Web.Spread.ButtonCellType bc = new FarPoint.Web.Spread.ButtonCellType();
bc.Text = "ボタン";
bc.CssClass = "CssStyle1";
bc.CommandName = "test1";
FpSpread1.ActiveSheetView.Cells[1, 0].CellType = bc;
}
-------------------------------
HTML
-------------------------------
※VBと同じです
旧文書番号
40401