回复 5楼gaoge00的帖子
屏蔽鼠标右键可以通过以下代码实现:
- private void Form1_Load(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.CellType.TextCellType textType = new FarPoint.Win.Spread.CellType.TextCellType();
- this.fpSpread1.Sheets[0].Columns[0].CellType = textType;
- this.fpSpread1.EditModeOn += new EventHandler(fpSpread1_EditModeOn);
- }
- void fpSpread1_EditModeOn(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.CellType.GeneralEditor tx = this.fpSpread1.EditingControl as FarPoint.Win.Spread.CellType.GeneralEditor;
- tx.Click += new EventHandler(tx_Click);
- tx.ContextMenu = new System.Windows.Forms.ContextMenu();
- tx.MouseDown += new MouseEventHandler(tx_MouseDown);
- }
复制代码 |