作成日: 2017/04/04 最終更新日: 2017/04/04
文書種別
使用方法
詳細
以下のようにCssClassを利用することで画像のサイズを指定することができます。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
------------------------
Webフォームクラス
------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
Return
End If
Dim ic As New FarPoint.Web.Spread.ImageCellType
ic.CssClass = "CssStyle1"
ic.ImageUrl = "tes.GIF"
FpSpread1.ActiveSheetView.Cells(1, 1).CellType = ic
End Sub
-------------------------------
HTML
-------------------------------
<style type="text/css">
.CssStyle1 img { width: 50px; height: 20px; }
</style>
Webフォームクラス
------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
Return
End If
Dim ic As New FarPoint.Web.Spread.ImageCellType
ic.CssClass = "CssStyle1"
ic.ImageUrl = "tes.GIF"
FpSpread1.ActiveSheetView.Cells(1, 1).CellType = ic
End Sub
-------------------------------
HTML
-------------------------------
<style type="text/css">
.CssStyle1 img { width: 50px; height: 20px; }
</style>
◎サンプルコード(C#)
------------------------
Webフォームクラス
------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
return;
}
FarPoint.Web.Spread.ImageCellType ic = new FarPoint.Web.Spread.ImageCellType();
ic.CssClass = "CssStyle1";
ic.ImageUrl = "tes.GIF";
FpSpread1.ActiveSheetView.Cells[1, 1].CellType = ic;
}
-------------------------------
HTML
-------------------------------
※VBと同じです
Webフォームクラス
------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
return;
}
FarPoint.Web.Spread.ImageCellType ic = new FarPoint.Web.Spread.ImageCellType();
ic.CssClass = "CssStyle1";
ic.ImageUrl = "tes.GIF";
FpSpread1.ActiveSheetView.Cells[1, 1].CellType = ic;
}
-------------------------------
HTML
-------------------------------
※VBと同じです
旧文書番号
40278