Hello,
TextBox can now store different DataTypes. I tested it. It runs fine (except, the "/", "." characters can be deleted, and no restriction for datatype specific input

). I think it's better to post here first for your check before SVN Commit
Code: Select all
METHOD Value (xValue) CLASS TEXTBOX
If Pcount() == 1
Do Case
Case ValType(xValue) == "N"
xValue := Str(xValue)
Case ValType(xValue) == "D"
xValue := Dtoc(xValue)
EndCase
Endif
If ::lCreated
If Pcount() == 0
RETURN If(::DataType == TXT_NUMERIC, ;
Val(::oQTObject:Text()), ;
If(::DataType == TXT_DATE, CToD(::oQTObject:Text()), ::oQTObject:Text()))
ElseIf Pcount() == 1
::oQTObject:SetText(xValue)
EndIf
Else
If Pcount() == 0
RETURN ::xValue
ElseIf Pcount() == 1
::xValue := xValue
EndIf
EndIf
RETURN NIL
...
...
METHOD DataType ( nValue ) CLASS TEXTBOX
// DataType is not a property of QLineEdit
If Pcount() == 0
RETURN ::nDataType
ElseIf Pcount() == 1
::nDataType := nValue
EndIf
RETURN Nil