回复 1楼chibang的帖子
设置边框的代码,请参考:
- // Create a new bevel border.
- FarPoint.Win.BevelBorder bevelbrdr = new FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised, Color.Cyan, Color.DarkCyan);
- // Create a new SheetView object.
- FarPoint.Win.Spread.SheetView newsheet=new FarPoint.Win.Spread.SheetView();
- // Set a cell's border to be the bevel border.
- newsheet.Cells[4, 3].Border = bevelbrdr;
- // Assign the SheetView object to the first sheet.
- fpSpread1.Sheets[0] = newsheet;
复制代码
可以使用单元格的BackColor属性设置单元格的背景色。
根据你的图片,你可以给区域Range设置背景色,代码请参考:
- FarPoint.Win.Spread.Cell cellA1;
- cellA1 = fpSpread1.ActiveSheet.Cells[0, 0];
- cellA1.BackColor = Color.Azure;
- cellA1.ForeColor = Color.Navy;
- FarPoint.Win.Spread.Cell cellrange;
- cellrange = fpSpread1.ActiveSheet.Cells[2,2,3,3];
- cellrange.BackColor = Color.Bisque;
复制代码 |