frang75 / nappgui_src

SDK for building cross-platform desktop apps in ANSI-C
https://www.nappgui.com
MIT License
442 stars 43 forks source link

Selection in Combo not working as expected #81

Open SamSandq opened 4 months ago

SamSandq commented 4 months ago

According to the documentation the combo box should trigger its combo_OnChange event when one clicks (selects) an item in the list. This will move the selected item to the visible edit box in the combo control.

This triggering does not happen on selection (neither in 1.3 nor 1.4).

However, if one enters a character or deletes something in the combo edit field, AND leaves the combo, it does trigger it; exactly like is documented for an Edit control as well.

Checking the sources, there is a combo_OnSelect event, but its code is commented out -- perhaps not ready for prime time?

However, it is needed because a frequent use-case is to populate the combo, and use it as a pop-down list box. So additionally, we also need to make it non-editable (a combo_editable function is also missing). Just like an Edit control.

frang75 commented 4 months ago

Hi Sam! Yes, I have a task to full review/update the ComboBox control for NAppGUI 1.4.1. There is an issue with the GTK3 Linux version also. It will be ready soon. Thanks for the report.

frang75 commented 4 months ago

Also referenced in #68