找回密码
 立即注册

QQ登录

只需一步,快速开始

laonawuli
银牌会员   /  发表于:2011-12-21 16:21:00
7#
原帖由 iceman 于 2011-12-21 16:02:00 发表
hello ~
1# 的 Case 可以通过重载 TextCellType 单元格类型来实现,然后重载其 GetEditorControl() 方法,把 Editor 置成 TextBox,这样我们就可以进行操作了,代码如下:
[code]
public class MyCellType : FarPoi......


哇塞 真牛!!真牛! Farpoint与iceman简直无所不能!
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2011-12-21 16:02:00
6#

回复 1# laonawuli 的帖子

hello ~
1# 的 Case 可以通过重载 TextCellType 单元格类型来实现,然后重载其 GetEditorControl() 方法,把 Editor 置成 TextBox,这样我们就可以进行操作了,代码如下:

  1.      public class MyCellType : FarPoint.Win.Spread.CellType.TextCellType
  2.     {
  3.         TextBox test = new TextBox();
  4.         public override Control GetEditorControl(Control parent, FarPoint.Win.Spread.Appearance appearance, float zoomFactor)
  5.         {
  6.          
  7.             test.BorderStyle = BorderStyle.None;
  8.             return test;
  9.         }
  10.         public override void SetEditorValue(object value)
  11.         {
  12.             test.Text = value.ToString();
  13.         }
  14.         public override object GetEditorValue()
  15.         {
  16.             return test.Text;
  17.         }
  18.     }
复制代码
回复 使用道具 举报
laonawuli
银牌会员   /  发表于:2011-12-21 15:51:00
5#
原帖由 iceman 于 2011-12-21 14:26:00 发表
hello laonawuli ,2# 判断 Cell 是否处于 Editing 状态可以通过 fpSpread1_EditModeOn 事件和 fpSpread1_EditModeOff 事件去判断。


我在查询用WIN32 API的方式来实现,研究有结果就发上来,同时期待iceman的正规打法。。。
回复 使用道具 举报
laonawuli
银牌会员   /  发表于:2011-12-21 15:39:00
地板
原帖由 iceman 于 2011-12-21 14:26:00 发表
hello laonawuli ,2# 判断 Cell 是否处于 Editing 状态可以通过 fpSpread1_EditModeOn 事件和 fpSpread1_EditModeOff 事件去判断。


多谢iceman,那请问第一个问题呢...
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2011-12-21 14:26:00
板凳

回复 2# laonawuli 的帖子

hello laonawuli ,2# 判断 Cell 是否处于 Editing 状态可以通过 fpSpread1_EditModeOn 事件和 fpSpread1_EditModeOff 事件去判断。
回复 使用道具 举报
laonawuli
银牌会员   /  发表于:2011-12-21 13:01:00
沙发
另外,如何知道某一个Cell是否处于Editing状态~?~?
回复 使用道具 举报
123
您需要登录后才可以回帖 登录 | 立即注册
返回顶部