delphi 在cxGrid中禁止使用滚轮修改数值
默认情况下,只要你不设置列属性的properties属性,一般不会有这个烦恼.
但是如果必须要设置properties属性,又想禁用鼠标滚轮的话,设计面板上是没有这个属性来给你直接设置的,需要使用代码

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

浙公网安备 33010602011771号