Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWComboBoxAsyncSelect
#1
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!
Reply
#2
The correct event is indeed OnAsyncChange, not OnAsyncSelect
Reply
#3
(11-12-2021, 03:09 AM)Alexandre Machado Wrote: The correct event is indeed OnAsyncChange, not OnAsyncSelect

Thanks for the reply.  I am trying to make it ALWAYS fire when you select a dropdown.  This only fires when there is a change in the dropdown index.  Is there a way to reset the control after a dropdown has been selected so it will always fire the OnAsyncChange event even if you repeatably choose the same dropdown index?  For example, I want to to have the control show what is at index 1 and have the control fire again even if it still has index 1 selected when the user selects it from the dropdown.
Reply
#4
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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)