请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册

QQ登录

只需一步,快速开始

zxfreg

初级会员

42

主题

132

帖子

352

积分

初级会员

积分
352

微信认证勋章

zxfreg
初级会员   /  发表于:2019-2-27 15:45  /   查看:2866  /  回复:1
设置单元格类型是ImageCellType,怎么设置图片自适应单元格大小?

1 个回复

倒序浏览
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2019-3-1 01:08:04
沙发

  1.     <style>
  2.         .CssStyle1 {
  3.             FONT: 700 12pt verdana;
  4.             COLOR: yellow
  5.         }

  6.         .CssStyle1 img{
  7.             width: 100%;
  8.         }
  9.     </style>
复制代码

  1.             FarPoint.Web.Spread.ImageCellType imagecell = new FarPoint.Web.Spread.ImageCellType();
  2.             imagecell.ImageUrl = "aaa.png";
  3.             imagecell.ImageAlign = System.Web.UI.WebControls.ImageAlign.Right;
  4.             imagecell.TextOnRight = true;
  5.             imagecell.CssClass = "CssStyle1";
  6.             FpSpread1.Sheets[0].Cells[0, 0].CellType = imagecell;
复制代码


没有直接属性设置,可以用css修改部分属性。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部