Right Click ??

pegamaster

New Member
how to activate the function right click of a mouse?

ex: ---------------------------------

Sub button1_rigt_click

Msgbo(" all ok ")

End Sub

----------------------------------------------
That this wrong, how?
 

Cableguy

Expert
Licensed User
Longtime User
The rigth click is only available with the context menu, on the controlEx Dll...
if you don't need the context menu, just use the event...
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is possible using the Door library:
B4X:
Sub Globals
    'Declare the global variables here.

End Sub

Sub App_Start
    Form1.Show
    AddObject("button1Click","Event")
    AddObject("obj","Object")
    obj.New1(false)
    obj.FromControl("button1")
    button1Click.New1(obj.Value,"MouseDown")
End Sub

Sub Button1Click_NewEvent
    obj.Value = button1Click.Data
    Select obj.GetProperty("Button")
        Case "Right"
            Msgbox("Right button was pressed")
        Case "Middle"
            Msgbox("Middle button was pressed")
        Case "Left"
            Msgbox("Left button was pressed")
    End Select
End Sub
 
Top