回复 1楼Angelboy的帖子
AlignHorz和AlignVert属性可以设置图片的对齐方式。
代码参考:
- FarPoint.Win.Picture p = new FarPoint.Win.Picture();
- p.Image = Image.FromFile("image.png");
- p.AlignHorz = FarPoint.Win.HorizontalAlignment.Center;
- p.AlignVert = FarPoint.Win.VerticalAlignment.Center;
- FarPoint.Win.Spread.CellType.TextCellType tcell = new FarPoint.Win.Spread.CellType.TextCellType();
- tcell.BackgroundImage = p;
- fpSpread1.ActiveSheet.Cells[0, 0].CellType = tcell;
复制代码 |