Hello,
I had the same problem
To solve it I used interposer classes
Add my unit ComboBoxNoWheel in your uses clause
In form.create disable mouse wheel on comboBoxes by adding this line :
MyDbComBoEh.DisableMouseWheel := True;
Rico
I can't attach a file so use this code :
Code:
unit ComboBoxNoWheel;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Mask, DBCtrlsEh,
DBGridEh, DBLookupEh;
Type
TDBComboBoxEh = Class(DBCtrlsEh.TDBComboBoxEh)
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;
private
FDisableMouseWheel: Boolean;
public
Property DisableMouseWheel: Boolean Read FDisableMouseWheel Write FDisableMouseWheel;
End;
TDBLookupComboBoxEh = Class(DBLookupEh.TDBLookupComboBoxEh)
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;
private
FDisableMouseWheel: Boolean;
public
Property DisableMouseWheel: Boolean Read FDisableMouseWheel Write FDisableMouseWheel;
End;
implementation
function TDBComboBoxEh.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;
begin
if Not FDisableMouseWheel then inherited
else Result := true;
end;
function TDBLookupComboBoxEh.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;
begin
if Not FDisableMouseWheel then inherited
else Result := true;
end;
end.