找回密码
 立即注册

QQ登录

只需一步,快速开始

neu_BeyondTechn

主题

帖子

积分

积分
  • 金币

  • 主题

  • 帖子

最新发帖
neu_BeyondTechn
  /  发表于:2013-9-30 09:22  /   查看:4522  /  回复:3
提示: 作者被禁止或删除 内容自动屏蔽

3 个回复

倒序浏览
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2013-9-30 15:34:00
沙发
neu_BeyondTechn

在Spread for WinForms 中是通过 fpSpread1.FocusRenderer 属性控制选择单元格样式的,我不清楚日文版文档是在哪个章节介绍了该功能,不过你可以参考英文文档,有该功能的详细描述:
http://helpcentral.componentone.com/NetHelp/SpreadNet7/WF/spwin-cellfocusind.html

比如通过以下代码可以实现:
  1.     public partial class Form1 : Form
  2.     {
  3.         public Form1()
  4.         {
  5.             InitializeComponent();
  6.         }

  7.         private void Form1_Load(object sender, EventArgs e)
  8.         {
  9.             MyIndicator render = new MyIndicator();
  10.             fpSpread1.FocusRenderer = render;
  11.         }
  12.     }

  13.     public class MyIndicator : FarPoint.Win.Spread.IFocusIndicatorRenderer
  14.     {
  15.         public void Paint(System.Drawing.Graphics g, int x, int y, int width, int height, bool left, bool top, bool right, bool bottom)
  16.         {
  17.             SolidBrush r = new SolidBrush(Color.FromArgb(20,20,20,200));            
  18.             g.FillRectangle(r, x, y, width, height);
  19.       
复制代码


可以实现这样的效果:
1157.png
回复 使用道具 举报
neu_BeyondTechn
  /  发表于:2013-9-30 16:37:00
板凳
提示: 作者被禁止或删除 内容自动屏蔽
回复 使用道具 举报
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2013-9-30 16:56:00
地板
也谢谢你分析方案。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部