xbrowse

xbrowse

Postby Colin Haig » 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
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: xbrowse

Postby nageswaragunupudi » Mon Jul 23, 2012 1: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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse

Postby Colin Haig » Mon Jul 23, 2012 2:11 am

Hi Mr Rao

Thank you - that worked fine.

Regards

Colin
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: xbrowse

Postby Rick Lipkin » 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: Select all  Expand view

// 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) }

 
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests