[Gambas-user] Right-click menu
Benoît Minisini
gambas at ...1...
Fri Oct 9 23:19:18 CEST 2009
> Troubles: I've done this
>
> PUBLIC SUB gV_Menu()
> DIM almenu, almenu1 AS Menu
> almenu = NEW Menu(FMain)
> almenu1 = NEW Menu(almenu)
> almenu1.Text = "Delete selected"
> almenu.Hide
> IF gV.Rows.Count > 0 AND gv.Column = 1 THEN
> SELECT Mouse.Right
> CASE TRUE
> almenu.popup()
> CASE ELSE
> END SELECT
> ENDIF
> END
>
> And the message is there are "no mouse event data".
> Can you explain me where to create a menu, or what's wrong with my code?
The "Menu" event is not a mouse event. It is just a event that tells you that
the user wants to popup the menu.
In other words, don't test the value of Mouse.Right. Just popup the menu.
Regards,
--
Benoît Minisini
More information about the User
mailing list