FarPoint.Web.Spread.Border bord = new FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.Tomato, 3);
foreach (SheetView sheet in templateNewSpread.Sheets)
{
sheet.AllowPage = false;
sheet.OperationMode = FarPoint.Web.Spread.OperationMode.Normal;
sheet.SelectionBackColorStyle = SelectionBackColorStyles.SemiTransparentSelectionBackColor;
sheet.SelectionBackColor = Color.LightGray;
sheet.SelectionPolicy = FarPoint.Web.Spread.Model.SelectionPolicy.MultiRange;
sheet.SelectionBorder = bord;
}
用了以上的代码,选择多个cell时,能显示选中的cell的背景色,选择单个cell,就不显示cell的背景色了 |
|