回复 3楼xaj21的帖子
不知道您指的封装都做了哪些操作,是否方便共享以便跟踪问题?
以下是我获取编辑器的代码:
- private void 添加ComboCellTypeToolStripMenuItem_Click(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.CellType.ComboBoxCellType cmbocell = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
- cmbocell.Items = (new String[] { "January", "February", "March", "April", "May", "June" });
- cmbocell.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
- cmbocell.AutoSearch = FarPoint.Win.AutoSearch.SingleCharacter;
- cmbocell.Editable = true;
- cmbocell.ListAlignment = FarPoint.Win.ListAlignment.Left;
- cmbocell.ListOffset = 20;
- cmbocell.ListWidth = 0;
- cmbocell.MaxDrop = 4;
- fpSpread1.Sheets[0].Cells[2, 2].CellType = cmbocell;
- this.fpSpread1.EditModeOn += fpSpread1_EditModeOn;
- }
- void fpSpread1_EditModeOn(object sender, EventArgs e)
- {
- var fb = this.fpSpread1.EditingControl as FarPoint.Win.FpCombo;
- fb.KeyDown += fb_KeyDown;
- }
- void fb_KeyDown(object sender, KeyEventArgs e)
- {
- }
复制代码 |