B4J Question MouseClick to move to the next id

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

Similar threads

B4J Library ToastMessageShow Library
B4J Tutorial Unhandled exceptions
B4J Tutorial UI App (JavaFX) Tutorial
B4J Tutorial Nodes / Views / Controls - Tips
B4J Tutorial Magnifying glass example
B4J Question Recall a sub
  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.

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

    End If
    End If
    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.