Intercepting keys in callback()

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Hi,

      This is kind of tricky, because there are two things to consider. First is, after clicking the DROPDOWN widget the listbox will get the focus and therefore the DROPDWON won't receive any key messages once it is expanded. The other one is that the LISTBOX is created dynamically and it is not easy to set callback for the LISTBOX of the DROPDOWN widget.

      Attached is an example on how you could do it anyway. I have set a callback for the DROPDOWN widget. It only checks if a LISTBOX is present and if it is it sets a callback to the LISTBOX.

      The callback of the LISTBOX reacts on key messages and collapse the DROPDOWN if the escape key has been pressed.

      Regards
      Sven
      Files