I am trying to write a custom autocomplete combobox, for example, if I input English character "a", auto completions may be other Chinese characters without "a", I can get completion arrays, but because without "a", the auto complete dropdown doesn't show.

Then, how can I make the auto complete dropdown show manually? Or how can I write this component for this purpose.

I am using built in autocomplete component, but it doesn't meet my function.

I need to display different choice that without any inputs. for example, if I input "a" in combobox, but I need to show the dropdown of Chinese characters without "a". I can get auto completions including Chinese characters by custom wxtextcomplete, but the dropdown doesn't show automatically.

I can get auto completions including Chinese characters by custom wxtextcomplete, but the dropdown doesn't show automatically.

If it doesn't show automatically (which an autocomplete usually does), when exactly does it show?

What platform are you testing on?

for example, if I input "z", the autocompletions are "张三" and "张四", the autocomplete dropdown will not show. But if I and "z" before autocompletions, the dropdown will show，only those autocompletions with the letter I inputted will show.

Please notice that the returned values should start with the prefix, otherwise they will be simply ignored, making adding them to the array in the first place useless.

I think this makes it quite clear that your solution cannot work.

I also tried wxTextCompleter and the same applies.

All this makes sense considering how autocompletion is supposed to work. I think that at least on MSW, this is also a limitation of the native behaviour (however, it seems that on Vista+ a native control can use ACO_NOPREFIXFILTERING option of IAutoComplete2 to work around it).

Regarding the solution of your issue, I would start with looking into wxStyledTextCtrl autocompletion, i.e., whether the autocompletion of this control is similarly restrictive as that of wxTextCtrl. I have no experience with wxSTC so I have no idea if it is the case. Using wxSTC may also not be appropriate for your use case, as this control has entirely different purpose than a simple single line input.

Rolling one's own proper autocompletion may not be that simple but you may end up just doing that.

As the last desperate option and only if your application is MSW only, I would try changing wxWidgets source, adding ACO_NOPREFIXFILTERING option in the wxTextAutoCompleteData ctor.

Please notice that the returned values should start with the prefix, otherwise they will be simply ignored, making adding them to the array in the first place useless.

I think this makes it quite clear that your solution cannot work.

I also tried wxTextCompleter and the same applies.

All this makes sense considering how autocompletion is supposed to work. I think that at least on MSW, this is also a limitation of the native behaviour (however, it seems that on Vista+ a native control can use ACO_NOPREFIXFILTERING option of IAutoComplete2 to work around it).

Regarding the solution of your issue, I would start with looking into wxStyledTextCtrl autocompletion, i.e., whether the autocompletion of this control is similarly restrictive as that of wxTextCtrl. I have no experience with wxSTC so I have no idea if it is the case. Using wxSTC may also not be appropriate for your use case, as this control has entirely different purpose than a simple single line input.

Rolling one's own proper autocompletion may not be that simple but you may end up just doing that.

As the last desperate option and only if your application is MSW only, I would try changing wxWidgets source, adding ACO_NOPREFIXFILTERING option in the wxTextAutoCompleteData ctor.

Thank you very much for you detailed instruction, I will try wxStyledTextCtrl, or changing source code.