hello ~
1# 的 Case 可以通过重载 TextCellType 单元格类型来实现,然后重载其 GetEditorControl() 方法,把 Editor 置成 TextBox,这样我们就可以进行操作了,代码如下:
- public class MyCellType : FarPoint.Win.Spread.CellType.TextCellType
- {
- TextBox test = new TextBox();
- public override Control GetEditorControl(Control parent, FarPoint.Win.Spread.Appearance appearance, float zoomFactor)
- {
-
- test.BorderStyle = BorderStyle.None;
- return test;
- }
- public override void SetEditorValue(object value)
- {
- test.Text = value.ToString();
- }
- public override object GetEditorValue()
- {
- return test.Text;
- }
- }
复制代码 |