FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveMac / FivePhone (iPhone, iPad) right mouseclick
Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
right mouseclick
Posted: Fri May 25, 2018 04:00 PM

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.

Kind regards,



René Koot
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: right mouseclick
Posted: Tue May 29, 2018 09:33 PM

in the absence of tests, I think it works..
Saludos.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: right mouseclick
Posted: Sun Jun 03, 2018 11:19 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
Re: right mouseclick
Posted: Tue Jun 05, 2018 09:44 PM

Hello Antonio,
Thanks, I will review this the next days. It looks like that is what I need.

Kind regards,



René Koot
Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
Re: right mouseclick
Posted: Fri Jun 08, 2018 09:06 AM
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 (fw): Select all Collapse
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.
Kind regards,



René Koot
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: right mouseclick
Posted: Fri Jun 08, 2018 12:38 PM

See last commit ( 03/06/2018 ) , browses.m change for handled rclick event .
I forgot to upload it in previous commit.
Sorry .

Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
Re: right mouseclick
Posted: Fri Jun 08, 2018 05:18 PM

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.

Kind regards,



René Koot
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: right mouseclick
Posted: Sun Jun 10, 2018 06:26 AM

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

Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
Re: right mouseclick
Posted: Sun Jun 10, 2018 12:55 PM

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?

Kind regards,



René Koot
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: right mouseclick
Posted: Sun Jun 10, 2018 01:48 PM

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.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: right mouseclick
Posted: Sun Jun 10, 2018 02:47 PM

Manuel,

many thanks for your help :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
Re: right mouseclick
Posted: Mon Jun 11, 2018 05:57 AM
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 (fw): Select all Collapse
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
Kind regards,



René Koot
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: right mouseclick
Posted: Mon Jun 11, 2018 04:39 PM

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?

Posts: 166
Joined: Wed Nov 25, 2015 07:13 PM
Re: right mouseclick
Posted: Mon Jun 11, 2018 05:48 PM

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?

Kind regards,



René Koot
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: right mouseclick
Posted: Mon Jun 11, 2018 09:03 PM

New libs width changes...
see browse.prg in samples from repository.

new libs ...

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