Search code examples
comboboxwxwidgets

wxwidgets combobox read-only on Windows


I have a wxwidgets (2.8) app that works great on Linux but on Windows the combo boxes are suddenly read-only. What do I need to do to get it to allow typing on Windows too? I process text events but I can't get characters typed to be recognized. Is there anything special on Windows that needs to be done?

In essence I am trying to use the combo box as a filtering select (like an autocomplete) and it works fine on Linux. Is something seriously wrong here on Windows?

Now, I am using wxperl and I have looked at the documentation, but when I type in the combo box on Linux/GTK it works but on Windows nothing appears. Am I missing a styling option or something? What differences in underlying widgets can account for this?

EDIT On further investigation they don't appear to be fully read only, but the text event seems to remove the text in the box, so this appears to be an issue with event handling. In essence, how do I process a text event without losing the value?


Solution

  • I found the problem. The issue is that Clear clears the value of the combo box on Windows but not on GTK. The solutions to fix the problem are not as readily portable across platforms as I would like but that is not that unexpected.