View Issue Details

IDProjectCategoryView StatusLast Update
0037558LazarusLCLpublic2020-08-17 08:35
ReporterHartmut Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformLinuxOSUbuntu 
Product Version2.0.6 
Summary0037558: TComboBoxEX.AutoComplete does not work (Linux)
DescriptionTComboBoxEX.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 InformationI have created a similar bug report for standard "TComboBox" in https://bugs.freepascal.org/view.php?id=37557
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetGTK 2
Attached Files

Relationships

related to 0037008 new TcomboBox.style not Delphi compliant and is causing TComboBoxEx to fail in any form or Editing(AutoComplete etc) 
related to 0037557 new TComboBox.AutoComplete does not work (Linux) 

Activities

Hartmut

2020-08-12 19:24

reporter  

Juha Manninen

2020-08-17 08:35

developer   ~0124941

TComboBoxEX inherits much of its behavior from TComboBox.
AutoComplete works the same in both I guess.
Same question as in the related issue. Does it work in other native GTK2 applications? If this is native widgetset behavior, this will be resolved as "no change required".

Issue History

Date Modified Username Field Change
2020-08-12 19:24 Hartmut New Issue
2020-08-12 19:24 Hartmut File Added: project1_bug_report_EX.zip
2020-08-13 13:10 Juha Manninen Relationship added related to 0037008
2020-08-17 08:32 Juha Manninen Relationship added related to 0037557
2020-08-17 08:35 Juha Manninen Note Added: 0124941