您好,Spread 的本身是支持单元格插入图片的,如果需要直接从剪切板中接图片粘贴,需要自己通过代码从剪切板中获取图片设置。
自定义按键行为:
http://help.grapecity.com/spread ... in-maps-action.html
- FarPoint.Win.Spread.CellType.ImageCellType imgct = new FarPoint.Win.Spread.CellType.ImageCellType();
- System.Drawing.Image image = System.Drawing.Image.FromFile("D:\\Logos\\logo.jpg");
- imgct.Style = FarPoint.Win.RenderStyle.Stretch;
- imgct.TransparencyColor = Color.Black;
- imgct.TransparencyTolerance = 20;
- fpSpread1.Sheets[0].Cells[1,1,1,2].BackColor = Color.Magenta;
- fpSpread1.Sheets[0].Columns[1,2].Width = 100;
- fpSpread1.Sheets[0].Rows[1,1].Height = 50;
- fpSpread1.Sheets[0].Cells[1,1,2,2].CellType = imgct;
- fpSpread1.Sheets[0].Cells[1,1].Value = image;
复制代码 |