回复 1楼taxsoft的帖子
taxsoft 你好,
1.目前无法消除 GrayArea 部分,如何行列不足以填充 Spread 表单大小,就会出现。如果根据表单宽度调整行高和列宽实现 100% 填充是否可以接受?
2.去掉粗粗的边框和选择行颜色可以参考以下代码:
- //设置行选择颜色
- fpSpread1.ActiveSheet.SelectionStyle = FarPoint.Win.Spread.SelectionStyles.SelectionColors;
- fpSpread1.ActiveSheet.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Range;
- fpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Row;
- fpSpread1.ActiveSheet.AddSelection(0, 0, 2, 2);
- fpSpread1.ActiveSheet.AddSelection(3, 0, 2, 2);
- fpSpread1.ActiveSheet.SelectionBackColor = Color.Red;
- fpSpread1.ActiveSheet.SelectionForeColor = Color.DarkBlue;
- fpSpread1.ActiveSheet.SelectionStyle = FarPoint.Win.Spread.SelectionStyles.SelectionColors;
- //去掉粗粗的边框
- FarPoint.Win.Spread.SolidFocusIndicatorRenderer sfir = new FarPoint.Win.Spread.SolidFocusIndicatorRenderer();
- sfir.Color=Color.Red;
- this.fpSpread1.FocusRenderer = sfir;
复制代码
3.鼠标掠过颜色,目前没有属性支持定制。可以通过 fpSpread1_MouseMove 事件进行定制。
- private void fpSpread1_MouseMove(object sender, MouseEventArgs e)
- {
- FarPoint.Win.Spread.Model.CellRange cr = this.fpSpread1.GetCellFromPixel(0, 0, e.X, e.Y);
- this.fpSpread1.Sheets[0].Cells[cr.Row, cr.Column].BackColor = Color.LightGreen;
- }
复制代码 |