Posts: 4
Threads: 2
Joined: Feb 2021
Reputation:
0
Location: USA
I am using Intraweb 15.2.42 with Delphi 10.2. I am trying to have an IWComboBox always fire an event when I select any of the dropdown options. I thought the AsyncSelect event would be the one, but I can't get it to fire under any circumstances. The AsyncChange event fires properly when I select a different option. Is there another setting I need to use? Thanks!
Posts: 2,267
Threads: 199
Joined: Mar 2018
Reputation:
86
Location: Auckland, New Zealand
The correct event is indeed OnAsyncChange, not OnAsyncSelect
Posts: 2,267
Threads: 199
Joined: Mar 2018
Reputation:
86
Location: Auckland, New Zealand
11-12-2021, 08:13 PM
(This post was last modified: 11-12-2021, 08:13 PM by Alexandre Machado.)
The IWComboBox (and other IW combo box/list box related controls) are wrappers around standard HTML 5 <SELECT> elements. Also, the OnAsyncSelect event is the equivalent of HTML 5 element's SELECT event. But the SELECT event fires when text is selected within the control (although in the case of a ComboBox it may suggest that it fires when an element is selected).
Bottom line is: HTML 5 doesn't provide such event (one that fires even if the same option is selected). It is not an IW limitation but how browsers work.
If you explain why you need this event to fire repeatedly even if the option doesn't change, we can think on other options... Maybe OnAsyncEnter/OnAsyncExit could also be used...