FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBROWSE brclicked
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
XBROWSE brclicked
Posted: Tue Dec 20, 2011 04: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

Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: XBROWSE brclicked
Posted: Wed Dec 21, 2011 04:18 PM

up
Please I'm trying to create a small sample program unsuccessfully

Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: XBROWSE brclicked
Posted: Wed Dec 21, 2011 04: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

Marco Boschi
info@marcoboschi.it
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE brclicked
Posted: Tue Dec 27, 2011 02: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
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: XBROWSE brclicked
Posted: Tue Dec 27, 2011 09:46 AM

ok
Many Thanks

Marco Boschi
info@marcoboschi.it
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: XBROWSE brclicked
Posted: Tue Aug 28, 2012 01: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
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: XBROWSE brclicked
Posted: Tue Aug 28, 2012 02: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 (fw): Select all Collapse
  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

Continue the discussion