TComboBoxEX.AutoComplete does not work (Linux)
Original Reporter info from Mantis: Hartmut @Hartmut2
-
Reporter name:
Original Reporter info from Mantis: Hartmut @Hartmut2
- Reporter name:
Description:
TComboBoxEX.AutoComplete does not work on Linux (on Windows the same demo works, when a patch is used).
I took the patch from https://bugs.freepascal.org/view.php?id=37008#c122611 (but it does not work on Linux).
Versions:
- Lazarus 2.0.6 / FPC 3.0.4 with gtk2 on Ubuntu 18.04 (64-bit) with KDE-Desktop
- Lazarus 2.0.6 / FPC 3.0.4 on Windows 7 (32-bit)
Here is my small demo (attached):
procedure TForm1.FormActivate(Sender: TObject);
var IE: TCollectionItem;
i: integer;
patch: boolean;
begin
with ComboBoxEx1 do
begin
AutoComplete:=true;
AutoCompleteOptions:=[acoAutoAppend]; {this is the Default}
AutoCompleteText:= {adding 'cbactEndOfLineComplete' makes no difference}
[cbactEnabled, {cbactEndOfLineComplete,} cbactSearchAscending];
i:=1; {allows easy testing of different Styles}
case i of
1: Style:=csExDropDown;
2: Style:=csExDropDownList;
3: Style:=csExSimple;
end;
writeln('Style=', Style);
ItemsEx.Clear;
ItemsEx.AddItem('1st text');
ItemsEx.AddItem('2nd text');
ItemsEx.AddItem('3rd text');
patch:=boolean(0); {allows easy testing of with or without Patch}
if patch then {see "Description" for this Patch}
begin
Items.Clear;
for IE in ItemsEx do Items.Add(TComboExItem(IE).Caption);
end;
ItemIndex:=0; {select first item}
end;
end;
Steps to reproduce:
- run the attached demo on Linux.
- click on the drop-down-arrow of the ComboBox (so that the itemlist is displayed) and then press a digit key from 1..3. Nothing happens.
- edit the demo to use another TComboBoxEx.Style and restart the demo - the result is the same for all 3 Style's.
- it makes no difference, if you enable the patch on Linux or not.
- on Windows AutoComplete works for all 3 Style's, if you enable the patch.
Additional information:
I have created a similar bug report for standard "TComboBox" in https://bugs.freepascal.org/view.php?id=37557
Mantis conversion info:
- Mantis ID: 37558
- OS: Ubuntu
- OS Build: 18.04 64-bit
- Platform: Linux
- Version: 2.0.6