How to programmatically click on a cell of an xBrowse?
TIA
:bEditWhen := {|oCol| CanEnterAmt(oCol) }
.
.
function CanEnterAmt(oCol)
local lRet := .t., nRow, nCol
if empty(oApp:oBrw:aArrayData[ oApp:oBrw:nArrayAt, LN_ACCN ])
lRet := .f.
// reset debit/credit amt col just in case
oApp:oBrw:aArrayData[ oApp:oBrw:nArrayAt, LN_AMOU_DR ] := 0.00
oApp:oBrw:aArrayData[ oApp:oBrw:nArrayAt, LN_AMOU_CR ] := 0.00
oApp:oBrw:drawSelect()
nRow := oApp:oBrw:nRowSel
nCol := oApp:oBrw:nColSel
msgalert("Amount can't be entered unless account code is specified")
oApp:oBrw:setPos(nRow, nCol)
oApp:oBrw:setFocus()
endif
return lRet
Rao wrote:bEditValid of a column in XBrowse may not contain any screen I/O like MsgInfo(), etc.
James Bott wrote:Here is another idea. Color the account code field pink until valid data has been entered, then turn white or green. Then un-gray the other fields, and if they are required then turn them pink until valid.
I don't think the user would know why it is invalid. I use valid routines all the time that take partially entered data and look it up in a database and present a list of choices. For instance a customer code. I don't think the user should have to know all of the 10 characters necessary to look up the customer code.
I would love to have a control that works like the Google toolbar field. Once you start typing it drops down a list and narrows the options the more you type the closer the match.
nageswaragunupudi wrote:bEditValid of a column in XBrowse may not contain any screen I/O like MsgInfo(), etc. This could result in unexpected behavior. We may have to accept this as a limitation.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 105 guests