Hello,
Lately, I have wanted to add autocomplete functionality to my application editor form, and I figured out some strange behaviour of the forms and the taskbar buttons. I prepared a simple testing project that replicated it.
Here is the description. I have a main form that is open when the application is launched. When clicked on the button, a new form with the editor opens.
If I set the property ShowInTaskBar := stDefault on both forms. In this situation, when you activate the autocomplete function on the editor (Ctrl+Space) all works fine as expected. However, I would like to have the editor in the taskbar as a separate button. So, my default setting is the following.
Property ShowInTaskBar := stDefault for the main form, and for the editor form, I set it to stAlways (in the test project, you can just click the checkbox and open a new editor form). In this case, when I activate the autocomplete function, the editor form loses focus, and the main form is in the foreground with the autocomplete selection on it. The editor form is not visible if the main form is maximised. When the autocompletion is selected, the editor form gets focused again and is moved to the foreground. This is very annoying.
I tried to set ShowInTaskBar := stAlways to both forms (also the main form). In this case, the editor form doesn't lose focus when the autocomplete function gets activated, but when the application is launched (only the main form is visible), there are two buttons in the taskbar. One with the name of the form and one with the name of the project.
Please, can you check if you have the same behaviours or if I am doing something wrong? Thanks in advance.
Note: When compiled on Linux and macOS, all works fine. The editor doesn't lose focus when the autocomplete function is activated.
System: Windows 10
CT: version 8.50