zhu_99031你好,
1.Spread 列头背景是使用图片填充的,可以使用以下方法去更改图片:
- FarPoint.Web.Spread.Background bg = new FarPoint.Web.Spread.Background();
- bg.SelectedBackgroundImageUrl = "images/BackGround.png";
- bg.BackgroundImageUrl = "images/BackGround.png";
- bg.Enable = true;
- FarPoint.Web.Spread.StyleInfo darkstyle = new FarPoint.Web.Spread.StyleInfo();
- darkstyle.Background =bg;
- // Apply the new style.
- FpSpread1.ActiveSheetView.ColumnHeader.DefaultStyle = darkstyle;
- this.FpSpread1.Sheets[0].ColumnHeader.Height = 50;
复制代码 2.可以使用如下方法去修改单击背景色:
- FarPoint.Web.Spread.StyleInfo customstyle = new FarPoint.Web.Spread.StyleInfo();
- //style.
- customstyle.BackColor = Color.White;
- customstyle.ForeColor = Color.Black;
- // Apply the new style.
- FpSpread1.ActiveSheetView.ColumnHeader.RowCount = 2;
- FpSpread1.ActiveSheetView.ColumnHeader.DefaultStyle = customstyle;
- this.FpSpread1.ActiveSheetView.SelectionBackColorStyle = FarPoint.Web.Spread.SelectionBackColorStyles.None;
复制代码 结合以上两种方法即可以满足该功能需求了~ |