LISTVIEW selection

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

  • LISTVIEW selection

    Is there a way to disable the user selection in LISTVIEW? At some point I don't want the user to be able to select a row/cell by touching the screen but I can't find a function which allow me to do that. Should I write some code in the WM_NOTIFICATION_SEL_CHANGED part of the callback function?

    Also, in the 5.26 version of the library, it is possible to enable cell selection instead of row selection. How can I read which cell is being selected? In the LISTVIEW.h there's a new function, LISTVIEW_GetSelCol, that doesn't appear in the pdf documentation. Should I use it in conjunction with LISTVIEW_GetSel to know which cell is selected?

    I don't want some cells allowed to be selected by the user. For doing that, I thought of writing some code in response to a WM_NOTIFICATION_SEL_CHANGED and cancel that selection or, if it's not possible, to emulate a selection of another cell. How could I do that?
  • Hello,

    You are right. We implemented the function LISTVIEW_GetSelCol() in order to be able to determine the selected cell in combination with the result of the function LISTVIEW_GetSel(). Of course we will add this to the user manual.

    I am afraid there is currently only the possibility to disable a row using the function LISTVIEW_DisableRow(). We will consider adding a function for disabling a cell in a future emWin version.

    Best regards,
    Adrian