FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Can :bRClickData coexist with :bPopUp on xBrowse?
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Can :bRClickData coexist with :bPopUp on xBrowse?
Posted: Mon Nov 26, 2012 09:19 PM
Hi.

I'm looking to execute a code block when rightclicking on a specific column, as in:

Code (fw): Select all Collapse
   WITH OBJECT ::oGrid
      :MedRec:bRClickData   := { || ::ChngMRec(), ::oGrid:Refresh(), ::oGrid:SetFocus() }


But for the rest of the columns I'd like to have a popup menu, as in:
Code (fw): Select all Collapse
   WITH OBJECT ::oGrid
      :bPopUp := { || ::ContextMenu() }
      :MedRec:bRClickData   := { || ::ChngMRec(), ::oGrid:Refresh(), ::oGrid:SetFocus() }


the problem is that :bPopUp takes precedence. Is it possible to have :bPopUp execute only when :bRclickData is NIL?


Reinaldo.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Can :bRClickData coexist with :bPopUp on xBrowse?
Posted: Tue Nov 27, 2012 05:58 AM
bPopup takes precedence over bRClickData. So for the same column, bRClickData does not work if bPopUp is defined.

For your requirement, you may assign the context menu block to all individual columns except the one for which you want bRClickData instead of to the browse object.

Code (fw): Select all Collapse
   WITH OBJECT ::oGrid
      :bPopUps := { || ::ContextMenu() }  // NOTE: bPopups NOT :bPopup
      
   WITH OBJECT :MedRec
      :bPopUp          := nil
      :bRClickData   := { || ::ChngMRec()
   END
END
Regards



G. N. Rao.

Hyderabad, India
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: Can :bRClickData coexist with :bPopUp on xBrowse?
Posted: Tue Nov 27, 2012 02:35 PM

Mr. Rao;

Excellent suggestion.

Thank you,

Reinaldo.

Continue the discussion