delphitvirtualstringtree

TVirtualStringTree search by more than 1 symbol


I have tried to make incremental search in TVirtualStringTree and found that it always uses a single character search string. When you press a key it starts searching immediately without waiting for the 2nd key which in turn becomes a single search string of the next search. Is this normal behavior and can it be changed easily (without creating timer thread)?


Solution

  • Without code, it's hard to tell where the problem is, but increasing the value of IncrementalSearchTimeout from basic 1000 ms could help. It determines how long it wil wait for the next key press before reset.

    Even if searching starts immediately after pressing the first key, it will continue with new string if you press other keys during timeout.

    You can simply try it in PropertiesDemo provided directly with Virtual TreeView.