How to go further with app

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

Post by Colin Haig »

Dale

I use Hernan's twbrowse and use in line data entry - with
validation on each cell if required.

oLbx5:bKeyChar := {|nKey| iif(nKey == VK_RETURN,EditLab(oLbx5:nColAct,oLbx5,oTmsht,oLbx1,oTmsht:keyno()),)}

oLbx5:lCellStyle = TRUE
oLbx5:lAutoEdit = TRUE
oLbx5:lAutoSkip = TRUE

static function EditLab(nCol,oLbx5,oTmsht,oLbx1,nRow)
local nNrml := oTmsht:chrg_nml,nTmHlf := oTmsht:chrg_ot,nDble := oTmsht:chrg_dbl

if nCol == 1
oLbx5:lEditCol(nCol,@nNrml,'99.99',,CLR_WHITE,CLR_RED,,)
oTmsht:chrg_nml := nNrml
oTmsht:save()
endif
if nCol == 2
oLbx5:lEditCol(nCol,@nTmHlf,'99.99',,CLR_WHITE,CLR_RED,,)
oTmsht:chrg_ot := nTmHlf
oTmsht:save()
endif
if nCol == 3
oLbx5:lEditCol(nCol,@nDble,'9999.99',,CLR_WHITE,CLR_RED,,)
oTmsht:chrg_dbl := nDble
oTmsht:save()
endif
oLbx5:Refresh()
oLbx5:SetFocus()
return(nil)

To do a validation just use a codeblock

oLbx4:lEditCol(nCol,@nQty,'9999.99',{|| if(!empty(cGroup),nQty := ChkQty(nQty,nStock,oInvItems,nOldQty,aChange),),TRUE} ,CLR_YELLOW,CLR_BLUE,,)

Colin
dpaterso
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa
Contact:

Post by dpaterso »

Thanks for the reply Colin.

Only problem is that I do not want to use any thirdy part code or utils (I have become painfully sort of 'known' for this).

I don't mean any offence to anybody by not wanting to use their stuff but I am happy with FWH from FiveTech Software and xHarbour from xHarbour and the support that I get from them and they are, after all, the companies that I am paying for the software and related support.

The problem with third party add-ons, code, or software, is that there is always the risk that there may be no continued support or updates. I mean, let's face it, most of the third party stuff has been written by the programmer for their own use and even if they make it available for everyone to use I'm sure that they don't want to keep being bugged by everyone for advice, bug fixes, etc. etc. at least not for no compensation.

I get fantastic support and follow-up from FiveTech and xHarbour and I know that they listen to us and sort out our problems within a reasonable amount of time and this, as well as the sale of their software, is their core business.

And I just know that after that great paragraph I will be seeing WIN32 HEADERS on TWBROWSE LISTBOX in the very near future :D :D :D

If not I will have to use TSBrowse :evil: :evil: :evil:

I mean - where is the loyalty :roll: :roll: :roll:

Regards,

Dale.
Post Reply