B4J Question How to carry out some action before allowing Listview change of index

Discussion in 'B4J Questions' started by Mahimahi, Feb 5, 2019.

Tags:
  1. Mahimahi

    Mahimahi Member Licensed User

    I am in a situation where I need to prevent Listview change of index (either mouse click or keyboard up/down) and take action to save a textarea content before allowing Listview's change of index. Unlike a button click, where it can be cancelled within the "action" sub, a change of index only shows as an event after.

    How can I accomplish that? Can someone please shed some light? Thanks a lot.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can save the previous index in a global variable and then do whatever you need to do with the previous value.
     
  3. Mahimahi

    Mahimahi Member Licensed User

    Thanks Erel. But then the app would still need to prompt user see if the content in textarea needs to be saved (after modification), as well, prevent the display of associated text/content in textarea of the new listview index that was clicked on, or switch back in the index changed event sub. I will test to see if that creates flickers by switching back right away.

    Is there a replacing control of listview that can do what I described? i.e. allowing the app to carry out some action before the change of index in a listview like index?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You can use xCustomListView and handle the selection logic yourself.
     
  5. Mahimahi

    Mahimahi Member Licensed User

    Thanks Erel. I will give xCustomListView a try.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice