[Gambas-user] Right-click menu

Dimitris Anogiatis dosida at ...626...
Fri Oct 9 09:03:49 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


On Fri, Oct 9, 2009 at 12:44 AM, M. Cs. <mohareve at ...626...> wrote:

> Is it possible to assign a pop-up menu to an object?
> I mean I have a gridview and I would like to have a right-click menu with
> few options like select all, delete selected etc.
> It would be activated when the mouse's pointer is above the gridview and
> the
> right mouse button would be clicked. A similar possibility exist in Delphi.
> I'm on Gambas 2.13.
> Thanks!
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list