XBROWSE brclicked

XBROWSE brclicked

Postby MarcoBoschi » Tue Dec 20, 2011 4:34 pm

Hi,
is it normal that if click right mouse button in a xbrowse this msginfo

oBrw:brClicked := {|nRow, nCol| MsgInfo( nrow ) }

appears only if in the xbrowse are present some records?

Or if I click in the left vertical bar?

In this program I show daily appointments and if in a day selected()
ordscope( 0 , dDay )
ordscope( 1 , dDay )
appointments may not be

And the brwclicked does not work

This is the real code:

oBrw:brClicked := {|nRow, nCol| Pop_app( nRow, nCol, oBrw, oTimer ) }

where pop_app is ....

FUNCTION POP_APP( nRow, nCol, oBrw, oTimer )

LOCAL oMen

oTimer:deactivate()
MENU oMen POPUP 2007

MENUITEM "Inserimento" ACTION ins_app( oBrw ) WHEN .NOT. lMensile
MENUITEM "Cancellazione" ACTION del_app( oBrw ) WHEN .NOT. lMensile
MENUITEM "Sposta" ACTION spo_app( oBrw ) WHEN .NOT. lMensile
MENUITEM "Chiudi questo menu" ACTION oMen:end()

ENDMENU

oMen:Activate( nRow, nCol, oBrw )
oTimer:activate()

RETURN NIL
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: XBROWSE brclicked

Postby MarcoBoschi » Wed Dec 21, 2011 4:18 pm

up
Please I'm trying to create a small sample program unsuccessfully
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: XBROWSE brclicked

Postby MarcoBoschi » Wed Dec 21, 2011 4:32 pm

This work Left Mouse click:
oBrw:blClicked := { | nRow , nCol | Pop_app( nRow, nCol, oBrw, oTimer ) }
Probably it is a correct behavior
I have to signal that there are non records in order to permits to user to add a record
Many thanks
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: XBROWSE brclicked

Postby nageswaragunupudi » Tue Dec 27, 2011 2:03 am

is it normal that if click right mouse button in a xbrowse this msginfo

oBrw:brClicked := {|nRow, nCol| MsgInfo( nrow ) }

appears only if in the xbrowse are present some records?

Yes, I think.
Let us see if we can modify this behavior
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: XBROWSE brclicked

Postby MarcoBoschi » Tue Dec 27, 2011 9:46 am

ok
Many Thanks
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: XBROWSE brclicked

Postby StefanHaupt » Tue Aug 28, 2012 1:48 pm

Nages,

please, is there a solution for this error I can implement in version 11.11 ?

bRClick is not executed if the xbrowse is empty or you click in an empty area of the xbrowse.

Many thanks.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: XBROWSE brclicked

Postby StefanHaupt » Tue Aug 28, 2012 2:14 pm

I found a post from Peter Harmes that put me in the right direction.

These are the changes in the method RButtonDown ()
Code: Select all  Expand view
 METHOD RButtonDown (...)
   ......
        elseif oCol:bRClickData != nil
           return Eval( oCol:bRClickData, nRow, nCol, nKeyFlags, oCol )
       endif
   else                  // added by Peter ------------------------------------------------------------------------------------
      if bPopUp != nil
         Eval( bPopUp, oCol ):Activate( (::nRowSel * ::nRowHeight) + ::nHeaderHeight, oCol:nDisplayCol, Self )
         return 0
      elseif oCol:bRClickData != nil
        return Eval( oCol:bRClickData, nRow, nCol, nKeyFlags, oCol )
      else
        return Eval (::bRClicked, nRow, nCol,nKeyFlags, oCol)       // added by me
      endif
     // ----------------------------------------------------------------------------------------
   endif

   If nColPos != 0 .and. nRowPos != 0
      return Super:RButtonDown( nRow, nCol, nKeyFlags )
   endif

return 0


Now you can right click in an empty browse in an empty area of the browse, the popup is executed.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 61 guests