回复 1楼czpi的帖子
测试代码如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- //设定单元格文本
- ButtonCellType bc = new ButtonCellType();
- bc.Text = "test";
- //锁定单元格
- this.fpSpread1.Sheets[0].Cells[0, 0].CellType = bc;
- this.fpSpread1.Sheets[0].Cells[0, 0].Locked = true;
- this.fpSpread1.Sheets[0].Cells[0, 1].CellType = bc;
- //获取button点击事件
- this.fpSpread1.ButtonClicked += fpSpread1_ButtonClicked;
- }
- void fpSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
- {
- }
复制代码 |