Carlo Barazzetta 112 Posted October 17, 2023 I'm searching for an "autocomplete editing" component (showing a list of possibilities) of available directories/filenames based on typed text, for an OpenSource project, so I need an OpenSource component that makes this work... Any suggestion? Thanks. Carlo Share this post Link to post
dummzeuch 1397 Posted October 17, 2023 (edited) 1 hour ago, Carlo Barazzetta said: I'm searching for an "autocomplete editing" component (showing a list of possibilities) of available directories/filenames based on typed text, for an OpenSource project, so I need an OpenSource component that makes this work... Any suggestion? Not a component but a function that adds this functionality to any TEdit: https://blog.dummzeuch.de/2019/04/28/autocompletion-for-tedits-revisited/ Edited October 17, 2023 by dummzeuch 2 Share this post Link to post
Carlo Barazzetta 112 Posted October 18, 2023 (edited) I've some problems using dzlib with Delphi11: 1) An AV inside TEnumStringFiles.Next 2) don't compile with 64bit platform Is this version the latest? https://sourceforge.net/projects/dzlib/ Thanks. Carlo Edited October 18, 2023 by Carlo Barazzetta Share this post Link to post
PeterBelow 225 Posted October 18, 2023 On 10/17/2023 at 11:02 AM, Carlo Barazzetta said: I'm searching for an "autocomplete editing" component (showing a list of possibilities) of available directories/filenames based on typed text, for an OpenSource project, so I need an OpenSource component that makes this work... Any suggestion? Thanks. Carlo Does a TCombobox, with the Items list filled with the available files, not fit your need? Share this post Link to post
Remy Lebeau 1264 Posted October 18, 2023 (edited) On 10/17/2023 at 2:58 AM, dummzeuch said: Not a component but a function that adds this functionality to any TEdit: https://blog.dummzeuch.de/2019/04/28/autocompletion-for-tedits-revisited/ Why implement a custom IEnumStrings class for directories/files? There is already a pre-made data source provided by the OS for that exact purpose - CLSID_ACListISF, which can be created with CoCreateInstance(), configured via IACList2::SetOptions(), and then passed to IAutoComplete::Init(). Edited October 18, 2023 by Remy Lebeau Share this post Link to post
dummzeuch 1397 Posted October 18, 2023 (edited) 1 hour ago, Remy Lebeau said: Why implement a custom IEnumStrings class for directories/files? There is already a pre-made data source provided by the OS for that exact purpose - CLSID_ACListISF, which can be created with CoCreateInstance(), configured via IACList2::SetOptions(), and then passed to IAutoComplete::Init(). Does that one also allow pre-filtering the filenames? e.g. If I only want to select from GX_*.pas files, or those matching *.dbf;*.dat ? I already had a similar function for filenames and directories without filtering using SHAutoComplete, but the filtering was important for me. (Short answer: I didn't know about this) Edited October 18, 2023 by dummzeuch Share this post Link to post
Remy Lebeau 1264 Posted October 18, 2023 30 minutes ago, dummzeuch said: Does that one also allow pre-filtering the filenames? e.g. If I only want to select from GX_*.pas files, or those matching *.dbf;*.dat ? Ah. No, it does not. In that case, you would indeed need a custom enumerator. Share this post Link to post