可以的
参考以下代码
- FarPoint.Win.Spread.IconNotify linen = new FarPoint.Win.Spread.IconNotify();
- linen.Icon = Properties.Resources.Spread;
- linen.IconAlignment = ContentAlignment.MiddleRight;
- linen.IconTip = "sfsfsdfsdfsf!";
- linen.DoActionReason = FarPoint.Win.Spread.ValidateReasons.EndEdit;
-
- FarPoint.Win.Spread.IncludeListValidator ilist = new FarPoint.Win.Spread.IncludeListValidator();
- ilist.Candidates = new string[] { "Bird", "Deer", "Squirrel", "Lizard" };
- ilist.Actions.Add(linen);
- ilist.Actions.Add(new MessageBoxNotify() { Icon= MessageBoxIcon.Error, Caption="错误",Message= "sfsfsdfsdfsf" });
- fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), ilist);
复制代码
|