FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
xbrowse
Posted: Sat Jul 21, 2012 11:48 PM

Hi All

When using xbrowse in cell edit mode I have one cell using a EDIT_BUTTON to open a
a notes type field but this means hitting the enter key or pressing the button for memo
dialog to open - is there a way to detect when that cell gets focus so the memo dialog opens
on the focus event - I looked through the source for xbrowse but could not see any focus methods,
There is a oCol:bOnPreEdit but I could not seem to do anything with it.

Regards

Colin

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse
Posted: Mon Jul 23, 2012 01:07 AM

Please set oBrw:lColChangeNotify := .t.
Then oBrw:bChange codeblock is evaluated when a column is changed also.
In the codeblock, please check if the oBrw:SelectedCol() == oYourCol and then take appropriate action.

Regards



G. N. Rao.

Hyderabad, India
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Re: xbrowse
Posted: Mon Jul 23, 2012 02:11 AM

Hi Mr Rao

Thank you - that worked fine.

Regards

Colin

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: xbrowse
Posted: Mon Jul 23, 2012 12:38 PM
Colin

You had asked if the is a pre and a post edit in xBrowse and there is .. the onPreEdit fires once the cell has been activated and the onPostEdit fires as the last event when you leave the cell.

Here is a snipit of code I use in an invoicing xBrowse app.

Rick Lipkin

Code (fw): Select all Collapse
// part number
oLbxB:aCols[3]:bEditWhen   := { || If(oRsDetail:fields("LockedDown"):Value = .f., .t.,.f.) }
oLbxB:aCols[3]:bOnPreEdit  := { || If(oRsDetail:Fields("Inventory Id"):Value = "  ", , __Keyboard( Chr( VK_HOME ))) }
oLbxB:aCols[3]:bOnPostEdit := {|o,v| _InvtLook( v, oRsDetail, oRsRepair, "3", oLbxB, @lTaxable, oTaxable, cLoc, oLabor,oParts,oMisc,oTax,oTotal,nTaxNumber) }

Continue the discussion