找回密码
 立即注册

QQ登录

只需一步,快速开始

Angelboy

注册会员

6

主题

22

帖子

144

积分

注册会员

积分
144

活字格认证

Angelboy
注册会员   /  发表于:2015-5-11 14:29  /   查看:4057  /  回复:1
插入图片怎么设置图片的对齐方式,

1 个回复

倒序浏览
Alice
社区贡献组   /  发表于:2015-5-11 14:36:00
沙发
回复 1楼Angelboy的帖子

AlignHorz和AlignVert属性可以设置图片的对齐方式。
代码参考:
  1. FarPoint.Win.Picture p = new FarPoint.Win.Picture();

  2.                 p.Image = Image.FromFile("image.png");

  3.                 p.AlignHorz = FarPoint.Win.HorizontalAlignment.Center;

  4.                 p.AlignVert = FarPoint.Win.VerticalAlignment.Center;



  5.                 FarPoint.Win.Spread.CellType.TextCellType tcell = new FarPoint.Win.Spread.CellType.TextCellType();

  6.                 tcell.BackgroundImage = p;

  7.                 fpSpread1.ActiveSheet.Cells[0, 0].CellType = tcell;

复制代码
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部