Hello~ 可以通过重载单元格类型实现,请参考代码:- class MyTextCellType : FarPoint.Win.Spread.CellType.TextCellType
- {
- TextBox textbox = new TextBox();
- ContextMenu screenMenu = new ContextMenu();
- public override Control GetEditorControl(Control parent, FarPoint.Win.Spread.Appearance appearance, float zoomFactor)
- {
- textbox.BackColor = System.Drawing.Color.Red;
- textbox.ContextMenu = screenMenu;
- return textbox;
- }
- }
复制代码 |