From 759c1a07f668baa1099285fa300a095483efadbb Mon Sep 17 00:00:00 2001 From: eFrysTon Date: Fri, 9 Nov 2018 04:00:56 +1000 Subject: [PATCH] fix for TES5Edit issue #589: dropdown list's horizontal scrollbar covers up the bottommost entry --- Source/cxVTEditors.pas | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Source/cxVTEditors.pas b/Source/cxVTEditors.pas index 3d392bb58..e60c52449 100644 --- a/Source/cxVTEditors.pas +++ b/Source/cxVTEditors.pas @@ -22,7 +22,7 @@ interface Controls, VTEditors, VirtualTrees, cxEdit, cxTextEdit, cxDropDownEdit,cxCheckComboBox, - cxLookAndFeelPainters; + cxLookAndFeelPainters, cxLookAndFeels; type TcxCustomEditLink = class(TCustomEditLink) @@ -173,6 +173,9 @@ procedure TcxComboEditLink.KeyPress(Sender: TObject; var Key: Char); if Key in [#13, #27] then Key := #0; // Eliminate beep end; +type + TcxComboBoxHacker = class(TcxComboBox); + procedure TcxComboEditLink.PrepareEditControl; begin inherited; @@ -181,6 +184,14 @@ procedure TcxComboEditLink.PrepareEditControl; Properties := celProperties; OnKeyPress := KeyPress; end; + with TcxComboBoxHacker(EditControl) do begin + LookAndFeel.ScrollbarMode := sbmClassic; + LookAndFeel.TouchScrollUIMode := tsmDisabled; + PopupControlsLookAndFeel.ScrollbarMode := sbmClassic; + PopupControlsLookAndFeel.TouchScrollUIMode := tsmDisabled; + end; + RootLookAndFeel.ScrollbarMode := sbmClassic; + RootLookAndFeel.TouchScrollUIMode := tsmDisabled; end; procedure TcxComboEditLink.SetEditText(const Value: WideString); @@ -291,6 +302,8 @@ procedure TcxCheckComboEditLink.KeyPress(Sender: TObject; var Key: Char); if Key in [#13, #27] then Key := #0; // Eliminate beep end; +type TcxCheckComboBoxHacker = class(TcxCheckComboBox); + procedure TcxCheckComboEditLink.PrepareEditControl; begin inherited; @@ -299,6 +312,14 @@ procedure TcxCheckComboEditLink.PrepareEditControl; Properties := ccelProperties; OnKeyPress := KeyPress; end; + with TcxCheckComboBoxHacker(EditControl) do begin + LookAndFeel.ScrollbarMode := sbmClassic; + LookAndFeel.TouchScrollUIMode := tsmDisabled; + PopupControlsLookAndFeel.ScrollbarMode := sbmClassic; + PopupControlsLookAndFeel.TouchScrollUIMode := tsmDisabled; + end; + RootLookAndFeel.ScrollbarMode := sbmClassic; + RootLookAndFeel.TouchScrollUIMode := tsmDisabled; end; procedure TcxCheckComboEditLink.SetEditText(const aValue: WideString);