for my TGrid i have
- Code: Select all Expand view
- function FW_Record()
return TDataRow()
now i like to add some PICTURE but which PICTURE for DATE to use depend on language
- Code: Select all Expand view
- oRec := FW_Record():New( aEdit, cName )
iMax := LEN( aEdit )
FOR ii := 1 TO iMax
nPosi := ASCAN(::aBroFields, {|x| x[1] = aEdit[ii][1] })
IF nPosi > 0
cType := ::aBroFields[ nPosi ] [ DBS_TYPE ]
nLen := ::aBroFields[ nPosi ] [ DBS_LEN ]
nDec := ::aBroFields[ nPosi ] [ DBS_DEC ]
DO CASE
CASE cType = "C"
cNewPic := Replicate("X", nLen)
oRec:FieldPic( ii, cNewPic )
CASE cType = "N"
IF nDec > 0
cNewPic := Replicate("9", nLen-nDec)+"."+ Replicate("9", nDec)
ELSE
cNewPic := Replicate("9", nLen)
ENDIF
oRec:FieldPic( ii, cNewPic )
CASE cType = "D"
// which PICTURE to use depend on language ?
cNewPic := "99.99.9999" // German Date
oRec:FieldPic( ii, cNewPic )
CASE cType = "L"
cNewPic := "L"
oRec:FieldPic( ii, cNewPic )
CASE cType = "M"
// Memo
ENDCASE
ENDIF
NEXT
lEdit := oRec:Edit()