right mouseclick

right mouseclick

Postby plantenkennis » Fri May 25, 2018 4: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
User avatar
plantenkennis
 
Posts: 166
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands

Re: right mouseclick

Postby mastintin » Tue May 29, 2018 9:33 pm

in the absence of tests, I think it works..
Saludos.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: right mouseclick

Postby Antonio Linares » Sun Jun 03, 2018 11:19 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: right mouseclick

Postby plantenkennis » Tue Jun 05, 2018 9:44 pm

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

René Koot
User avatar
plantenkennis
 
Posts: 166
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands

Re: right mouseclick

Postby plantenkennis » Fri Jun 08, 2018 9: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: Select all  Expand view
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
User avatar
plantenkennis
 
Posts: 166
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands

Re: right mouseclick

Postby mastintin » 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 .
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: right mouseclick

Postby plantenkennis » Fri Jun 08, 2018 5: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
User avatar
plantenkennis
 
Posts: 166
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands

Re: right mouseclick

Postby mastintin » Sun Jun 10, 2018 6: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
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: right mouseclick

Postby plantenkennis » 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
User avatar
plantenkennis
 
Posts: 166
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands

Re: right mouseclick

Postby mastintin » Sun Jun 10, 2018 1: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.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: right mouseclick

Postby Antonio Linares » Sun Jun 10, 2018 2:47 pm

Manuel,

many thanks for your help :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: right mouseclick

Postby plantenkennis » Mon Jun 11, 2018 5: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: Select all  Expand view

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
User avatar
plantenkennis
 
Posts: 166
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands

Re: right mouseclick

Postby mastintin » Mon Jun 11, 2018 4: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?
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: right mouseclick

Postby plantenkennis » Mon Jun 11, 2018 5: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
User avatar
plantenkennis
 
Posts: 166
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands

Re: right mouseclick

Postby mastintin » Mon Jun 11, 2018 9: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.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Next

Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 39 guests