TComboBox.AutoComplete does not work (Linux)
Original Reporter info from Mantis: Hartmut @Hartmut2
-
Reporter name:
Original Reporter info from Mantis: Hartmut @Hartmut2
- Reporter name:
Description:
TComboBox.AutoComplete does not work on Linux (on Windows the same demo works).
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 i: integer;
begin
with ComboBox1 do
begin
AutoComplete:=true;
AutoCompleteText:= {adding 'cbactEndOfLineComplete' makes no difference}
[cbactEnabled, {cbactEndOfLineComplete,} cbactSearchAscending];
i:=2; {allows easy testing of different Styles}
case i of
1: Style:=csDropDown;
2: Style:=csDropDownList;
3: Style:=csSimple;
end;
writeln('Style=', Style);
Items.Clear;
Items.Add('1st text');
Items.Add('2nd text');
Items.Add('3rd text');
ItemIndex:=0; {select first item}
end;
end;
Steps to reproduce:
- run the attached demo on Linux (it uses TComboBox.Style=csDropDownList).
- 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 TComboBox.Style=csDropDown (i=1) or csSimple (i=3) and restart the demo.
- 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.
- then: delete the content of the ComboBox completely and then press a digit key from 1..3. Now AutoComplete works, but this is a) very uncomfortable and b) does not work with Style=csDropDownList (which is essential for ReadOnly-Mode) and c) is not neccessary on Windows.
Additional information:
I will create a similar bug report for TComboBoxEX soon and add it's link here.
Mantis conversion info:
- Mantis ID: 37557
- OS: Ubuntu
- OS Build: 18.04 64-bit
- Platform: Linux
- Version: 2.0.6
- Monitored by: » AntonK (Anton Kavalenka)