B4J Question Detect Right Nouse Click

rgarnett1955

Active Member
Licensed User
Longtime User
Hi,

I would like to differentiate between left and right mouse clicks when clicking on a b4j Pane. I understand from the docs B4X Basic Language pp 80 which events each object type can activate, but I couldn't find anything on Right - Left differentiation.

I have looked at a number of posts


But I am a bit lost.

Can some one point me in the right direction

Best regards
Rob
 

MicroDrie

Well-Known Member
Licensed User
Detect Right mouse click:
Private Sub Pane1_MouseClicked (EventData As MouseEvent)
    If EventData.PrimaryButtonPressed =True Then
        Log("Leftmouse clicked!")
    End If
    
    If EventData.MiddleButtonPressed =True Then
        Log("Midlemouse clicked!")
    End If
    
    If EventData.SecondaryButtonPressed =True Then
        Log("Rightmouse clicked!")
    End If
End Sub
 
Upvote 0
Top