Skip to content

Commit

Permalink
fix for TES5Edit issue JAM-Software#589: dropdown list's horizontal s…
Browse files Browse the repository at this point in the history
…crollbar covers up the bottommost entry
  • Loading branch information
ElminsterAU authored and Sharlikran committed Nov 11, 2018
1 parent a2e9bb3 commit 759c1a0
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion Source/cxVTEditors.pas
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface
Controls,
VTEditors, VirtualTrees,
cxEdit, cxTextEdit, cxDropDownEdit,cxCheckComboBox,
cxLookAndFeelPainters;
cxLookAndFeelPainters, cxLookAndFeels;

type
TcxCustomEditLink = class(TCustomEditLink)
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 759c1a0

Please sign in to comment.