delphi 在cxGrid中禁止使用滚轮修改数值

📅 2026/7/3 8:20:50 👁️ 阅读次数 📝 编程学习
delphi 在cxGrid中禁止使用滚轮修改数值

默认情况下,只要你不设置列属性的properties属性,一般不会有这个烦恼.

但是如果必须要设置properties属性,又想禁用鼠标滚轮的话,设计面板上是没有这个属性来给你直接设置的,需要使用代码

test2

procedure TfraModuleCPRK.GridView1InitEdit(Sender: TcxCustomGridTableView;AItem: TcxCustomGridTableItem; AEdit: TcxCustomEdit);
beginif AEdit is TcxSpinEdit thenbegin  //禁止使用滚轮TcxSpinEdit(AEdit).Properties.UseMouseWheel := False;end;
end;