回复 1楼紫藤的帖子
请问你是指的 ComboBoxCellType 吗?
当前没有提供通过 byte 计算长度的属性。可以通过自定义实现。
- private void textToolStripMenuItem_Click(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.CellType.ComboBoxCellType cb = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
- cb.Items = new string[] { "OneHundredThousand", "TwoHundredThousand", "ThreeHundredThousand" };
- cb.EditorValueChanged += new EventHandler(cb_EditorValueChanged);
- cb.Editable = true;
- fpSpread1.ActiveSheet.Cells[0, 0].CellType = cb;
- fpSpread1.ActiveSheet.Columns[0].Width = 120;
- }
- void cb_EditorValueChanged(object sender, EventArgs e)
- {
- //从这里获取当前输入文本的字节数
- string text = this.fpSpread1.Sheets[0].Cells[0, 0].Text;
- }
复制代码 |