B4J Question MouseClick to move to the next id

Discussion in 'B4J Questions' started by giga, Jun 18, 2015.

  1. giga

    giga Well-Known Member Licensed User

    I would like to move to the next id via the same button. I am using sender but it is not working how I need it or maybe I don't understand it.


    Code:
    testbtn = Sender
        
    If EventData.ClickCount = 1 Then
        
    Log("record  :" & id(1))
         
    Else
         
    If EventData.ClickCount = 2 Then
        
    Log("record  :" & id(2))

    End If
      
    End If
    Next
    One click gets me id(1) then two clicks gets me id(2)

    But I would like one click to move to each id (one click at a time from the same button.)


    Thanks for any advice as always.
     
    Last edited: Jun 19, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    ClickCount = 2 means that the user double clicked on the button. It doesn't count the total number of clicks. You need to use a global variable to count it.
     
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