找回密码
 立即注册

QQ登录

只需一步,快速开始

sean03424014

注册会员

8

主题

23

帖子

61

积分

注册会员

积分
61

活字格认证

sean03424014
注册会员   /  发表于:2015-2-26 17:38  /   查看:4431  /  回复:4
选择cell对应的行列头不选择,行列头的颜色不变。

4 个回复

倒序浏览
sean03424014
注册会员   /  发表于:2015-2-27 08:16:00
沙发
怎么没有人?
人都哪里去了?
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-2-27 10:20:00
板凳
回复 2楼sean03424014的帖子

可以通过替换 Spread 行列头背景图片来实现:

  1.             FarPoint.Web.Spread.Background bg = new FarPoint.Web.Spread.Background();
  2.             bg.SelectedBackgroundImageUrl = "images/BackGround.png";
  3.             bg.BackgroundImageUrl = "images/BackGround.png";
  4.             bg.Enable = true;

  5.             FarPoint.Web.Spread.StyleInfo darkstyle = new FarPoint.Web.Spread.StyleInfo();
  6.             darkstyle.Background = bg;

  7.             // Apply the new style.

  8.             FpSpread1.ActiveSheetView.ColumnHeader.DefaultStyle = darkstyle;
  9.             FpSpread1.ActiveSheetView.RowHeader.DefaultStyle = darkstyle;
复制代码
回复 使用道具 举报
sean03424014
注册会员   /  发表于:2015-2-27 14:11:00
地板
这个方法我试了一下,实现不了我要的功能。。。
选择cell后,行列头的颜色还是有变化,行列头颜色跟选择cell前不一样。。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-2-27 15:40:00
5#
回复 4楼sean03424014的帖子

SelectedBackgroundImageUrl 用于设置选择后的行列头背景图片;
BackgroundImageUrl用于设置默认状态下的行列头背景图片;
所以,如果这个两个属性设置为同一图片,则不会改变。

附件是我制作的 Demo,请查看:
15879.zip (25.7 KB, 下载次数: 202)
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部