[Gambas-user] Right-click menu
Benoît Minisini
gambas at ...1...
Fri Oct 9 13:47:53 CEST 2009
> M Cs,
>
> try this:
> create a Menu with name mnuGrid and make it hidden
> then add this to the gridview's mousedown event
>
> PUBLIC SUB gridview1_MouseDown()
>
> IF gridview1.Rows.Count > 0 AND gvBackup.Column = 1
> SELECT Mouse.Right
> CASE TRUE
> mnuGrid.popup()
> CASE ELSE
> END SELECT
> ENDIF
>
> END
>
> This will popup your menu if you right click on the second column of any
> row (besides the header) of the gridview.
>
> I hope it helps
>
> Regards,
> Dimitris
>
Never use the MouseDown event to popup menu. You must use the Menu event
instead, otherwise the menu key will never work.
Regards,
--
Benoît Minisini
More information about the User
mailing list