title: How can I prevent that a LCL defined focused empty ListBox implementing some kind of search field
body: <p>I'm working with</p>
  <ul>
  <li>FreePascal 3.2.0,</li>
  <li>Lazarus 2.0.12,</li>
  <li>GTK2 GUI backend</li>
  <li>under Ubuntu Linux 18.04.</li>
  </ul>
  <p>I have a strange behavior of a TListBox component.</p>
  <ol>
  <li>When I focus a empty ListBox by clicking (SetFocus) and</li>
  <li>press the [space] key,
  some kind of Edit or SearchField appears (..see image below).</li>
  <li>The field vanishes after a short period (3 s).</li>
  </ol>
  <p>How can I switch off this <em>&quot;feature&quot;</em>.</p>
  <p><a href="https://i.stack.imgur.com/Qp0Qk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qp0Qk.png" alt="enter image description here" /></a></p>
  <p>My current work around is to use a handler for the onEnter event to take away the ListBox focus (full code example see below).</p>
  <pre class="lang-pascal prettyprint-override"><code>procedure TFrmMain.lbxTestEnter(Sender: TObject);
      begin
        if mUseWorkAround then begin
           if LbxTest.Items.Count = 0 then begin
              PnlButton.SetFocus;
              exit;
           end;
        end;
      end;         
  </code></pre>
  <p>I'm not sure if this is the right way.</p>
  <p><strong>Full Code Example:</strong></p>
  <pre class="lang-pascal prettyprint-override"><code>unit UFrmTestListBox;
  
  {$mode objfpc}{$H+}
  
  interface
  
  uses
    Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
    StdCtrls;
  
  const
  
    PNL_MESSAGE = 'WORK AROUND IS %sACTIVE! ';
  
  type
  
    { TFrmMain }
  
    TFrmMain = class(TForm)
      BtnToggle: TButton;
      GbxList:   TGroupBox;
      GbxLog:    TGroupBox;
      LbxTest:   TListBox;
      MmLog:     TMemo;
      PnlButton: TPanel;
      SplMain:   TSplitter;
      procedure  BtnToggleClick(Sender: TObject);
      procedure  FormCreate(Sender: TObject);
      procedure lbxTestEnter(Sender: TObject);
    private
      mUseWorkAround: Boolean;
      mCounter: Integer;
      procedure OutLn(S:String);
    public
  
    end;
  
  var
    FrmMain: TFrmMain;
  
  implementation
  
  {$R *.lfm}
  
  procedure TFrmMain.FormCreate(Sender: TObject);
  begin
    mUseWorkAround:= false;
    mCounter := 0;
    PnlButton.Caption:=Format(PNL_MESSAGE,['NOT ']);
  end;
  
  procedure TFrmMain.lbxTestEnter(Sender: TObject);
  begin
    inc(mCounter);
    OutLn('');
    OutLn(Format('--- %d -----------------------', [mCounter]));
    OutLn('ListBox onEnter event');
    if mUseWorkAround then begin
       OutLn('Work around is active!');
       if LbxTest.Items.Count = 0 then begin
          OutLn('ListBox is empty, change focus to the button panel.');
          PnlButton.SetFocus;
          exit;
       end;
    end else begin
      OutLn('Work around NOT active!');
      OutLn('ListBox is empty, press [SPACE] &amp; EditField appears.')
    end;
  end;
  
  procedure TFrmMain.BtnToggleClick(Sender: TObject);
  begin
    mUseWorkAround:=not mUseWorkAround;
    if mUseWorkAround then
      PnlButton.Caption:=Format(PNL_MESSAGE,[''])
    else
      PnlButton.Caption:=Format(PNL_MESSAGE,['NOT ']);
  end;
  
  procedure TFrmMain.OutLn(S:String);
  begin
       MmLog.Lines.BeginUpdate;
       MmLog.Lines.Append(S);
       MmLog.Lines.EndUpdate;
       MmLog.SelStart := Length(MmLog.Lines.Text);
  end;
  
  end.
           
  </code></pre>