【发布时间】:2021-10-03 20:50:30
【问题描述】:
this.Solvers.AutoHeight = false;
this.Solvers.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.Solvers.Items.AddRange(new object[] {
"Apple",
"Orange",
"Custom",
"Grapes"});
this.Solvers.Name = "Solvers";
this.Solvers.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
this.Solvers.EditValueChanged += new System.EventHandler(this.ricbSolvers_EditValueChanged);
当我打开应用程序时,我会检查一些值。如果 vaule 为 false,则应禁用“橙色”按钮。如何实现。
if(value==false)
{
//diable button orange
}
【问题讨论】:
-
我不确定您要达到什么目的?阻止用户选择橙色?你为什么不直接删除它?
-
-
基本上我们需要根据一些参数来启用和禁用组合框中的项目
标签: c# winforms combobox devexpress