Page 1 of 2

right mouseclick

Posted: Fri May 25, 2018 4:00 pm
by plantenkennis
Hello,

How can I make a contextmenu which opens on a rightclick of the mouse. I want to use it on a browse to run some functions on a selected row.

Re: right mouseclick

Posted: Tue May 29, 2018 9:33 pm
by mastintin
in the absence of tests, I think it works..
Saludos.

Re: right mouseclick

Posted: Sun Jun 03, 2018 11:19 am
by Antonio Linares
Dear René,

Please review this FiveMac commit:

https://bitbucket.org/fivetech/fivemac/ ... d4fa00807e

Re: right mouseclick

Posted: Tue Jun 05, 2018 9:44 pm
by plantenkennis
Hello Antonio,
Thanks, I will review this the next days. It looks like that is what I need.

Re: right mouseclick

Posted: Fri Jun 08, 2018 9:06 am
by plantenkennis
Hello Antonio,
I have reviewed the modifications, but it does not work at this time. In browse there is no bRClicked method?
I made the command as follows:

Code: Select all

oBrw:bMouseDown = { | nRow, nCol, oControl | ShowPop( nRow, nCol , oPopUP,ownd )}
and now the popup does not show at the place where I clicks, It shows at the bottom of the window.

Re: right mouseclick

Posted: Fri Jun 08, 2018 12:38 pm
by mastintin
See last commit ( 03/06/2018 ) , browses.m change for handled rclick event .
I forgot to upload it in previous commit.
Sorry .

Re: right mouseclick

Posted: Fri Jun 08, 2018 5:18 pm
by plantenkennis
Hello Mastintin,
I see the modifications, but if I changes browses.m, must I build new libs?
And if so, how do i build these libs, I have never done this before, sorry.

Re: right mouseclick

Posted: Sun Jun 10, 2018 6:26 am
by mastintin
try these libraries ( I recommend making a copy of yours in case they fail )

https://www.dropbox.com/s/7c5o9i1m0kn3v ... p.zip?dl=0

please confirm if they work.
Regards

Re: right mouseclick

Posted: Sun Jun 10, 2018 12:55 pm
by plantenkennis
Hello Mastintin,

Thanks, these new libs gets the rihtclick popup menu just like I want.

Are there other addaptions included in these libs, requests from previous asked questions?

Re: right mouseclick

Posted: Sun Jun 10, 2018 1:48 pm
by mastintin
SCREENVISIBLEHEIGHT, SCREENVISIBLEWIDTH, STATUSBARHEIGHT, GETDOCKPOSITION ,GETDOCKSIZE ISDOCKHIDDENc is implemented in this libs.

Mailer is in libs , use mail app to send mails but not send files Attached ( sorry )
I have code to send mail With attached files but then do not send them automatically...

Automatizacion with sandbox only include apple app . I not have code for thunderbird ( for now )
Regards.

Re: right mouseclick

Posted: Sun Jun 10, 2018 2:47 pm
by Antonio Linares
Manuel,

many thanks for your help :-)

Re: right mouseclick

Posted: Mon Jun 11, 2018 5:57 am
by plantenkennis
Hello Manuel,

Thanks a lot for all new functions implemented.

For the popup menu I would suggest the following addaption:

If the user rightclicks on a row in a browse, the pointer in that browse should go to the row where the user clicks. That way we can use the functions on that row. Now I first have to click normal on a row to set the row active and then rightclick to do something with that row. So actuallly the rightclick should perform a bChange before activates the popupmenu

Is this possible?

Code: Select all

oBrwMain:bChange := { | obj , nindex| nBrowRowActive := obj:nRowPos() }
oBrwMain:bAction := { | obj , nindex|  IF(lBruikbaar, RK_ShowDetail(nBrowRowActive), MsgInfo('Het programma is nu niet bruikbaar,' + CR_LF + 'registreer deze eerst!', 'mededeling')) } 
oBrwMain:bRClicked := { | nRow, nCol, oControl | ShowPopupMain( nRow, nCol, oPopupMain, oBrwMain:oWnd ) } <<when I click the browserow does not get blue/active

 

Re: right mouseclick

Posted: Mon Jun 11, 2018 4:39 pm
by mastintin
the problem is that the position where the pop is show must be passed to the handle.
the code we have can pass up to 3 parameters:

  function _FMH (hWnd, nMsg, hSender, uParam1, uParam2, uParam3)

We would have to add one more parameter ( I do not think it creates problems )

the parameters to pass would be xMousepos,yMousepos,nBrwrow,nBrwcol ...

oBrw:bRClicked := { | xpos, ypos, nBrwRow, nBrCol, oControl | ShowPop( xpos, ypos, opopUp, oBrw:oWnd ) }

Would this serve?

Re: right mouseclick

Posted: Mon Jun 11, 2018 5:48 pm
by plantenkennis
Hello Manuel,

I think your suggestion would serve well. That way we know on what nBrwrow the user clicks and we can perform an action on that row. I suppose we can send the nBrwrow and nBrwcol to the Showpop function?

Re: right mouseclick

Posted: Mon Jun 11, 2018 9:03 pm
by mastintin
New libs width changes...
see browse.prg in samples from repository.

new libs ...
https://www.dropbox.com/s/zr322rimlapki ... s.zip?dl=0
Regards.