How to programmatically click on a cell of an xBrowse?
TIA
BCC5.82/BCC7.3
xHarbour/Harbour
How to programmatically click on a cell of an xBrowse?
TIA
oBrw:SetPos( nRow, nCol )
nRow is the visible row number from top and nCol is the visible column from left.
Thanks Rao. How to obtain the initial relative nRow and nCol?
Thanks again.
: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 lRetbEditValid 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.
That seems to be quite a limitation. I was going to use xBrowse for some data entry, but this might be an issue.
What would be your suggestion for informing the user what the entry error was?
Maybe you could gray-out the cells until the account code is entered.
Regards,
James
Rao wrote:bEditValid of a column in XBrowse may not contain any screen I/O like MsgInfo(), etc.
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.
Regards,
James
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.
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.
I thought the problem was doing something like msginfo() during the oCol get entry on xbrowse. I see it can be done with oCol:nEditType := EDIT_DATE because it does a drop down date selector.
I guess I need to do some testing and see what the limits are during the edit on xbrowwse.
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.