emWin: prevent LISTBOX getting input focus

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

  • emWin: prevent LISTBOX getting input focus

    Hi,


    in emWin:
    How do I prevent a LISTBOX-widget from getting the input focus ?
    The BUTTON-widget or the EDIT-widget have the <Widget>_SetFocussed() function. But LISTBOX doesn't. Is there another possibility?
    Thanks in advance for any hint.


    Regards,
    Sol
  • Hi,

    try overwriting the LISTBOX callback function and simply do nothing on WM_SET_FOCUS message.
    Set the callback with WM_SetCallback(hListbox, _cbListbox);

    C Source Code

    1. static void _cbListbox(WM_MESSAGE * pMsg) {
    2. switch (pMsg->MsgId) {
    3. case WM_SET_FOCUS:
    4. break;
    5. default:
    6. LISTBOX_Callback(pMsg);
    7. break;
    8. }
    9. }


    Any other messages are getting handle by the default callback.

    Regards,
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.