用DropDown和CloseUp加个锁,区分是编辑还是鼠标选择。
- private bool _selectByMouse = false;
- private void fpSpread1_ComboSelChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
- {
- if (this._selectByMouse)
- {
- Console.WriteLine("comblselchanged");
- }
- }
- private void fpSpread1_ComboDropDown(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
- {
- this._selectByMouse = true;
- }
- private void fpSpread1_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
- {
- this._selectByMouse = false;
- }
复制代码 |