After some commits, TEXBOX object doesn't work properly.
I'm using this code:
Code: Select all
WITH OBJECT TEXTBOX():New( "fshfemacm" )
:Row := 90
:Col := 560
:Width := 100
:Height := 20
:DataType := TXT_NUMERIC
:Value := 0
:ToolTip := "Enter valid cm"
END WITH
TEXTBOX is a foundamental object and it is very hard to manage: I know.
Some times ago, I sent to Francesco my POW about TEXTBOX (without usage of VALID and WHEN clause). It's an experiment, running experiment, but (I think) it can be considered a good way (to improve).
I used this logic:
- A) data type must be a parameter when TEXTBOX object was created. There isn't problem with HMG3 command because value is known (TEXT by default, NUMERIC or DATE if present).
With HMG4, New method will be TEXTBOX():New( cName, oParent, nDataType ). All parameters can be optional; when numeric or date value must be managed, TXT_NUMERIC or TXT_DATE must be inserted.
- B) when mask present, there is a translations from Clipper style to Qt style and setinputmask (Qt property about QlineEdit) it will be used.
In other words, like Clipper "@999,999.99 999,999.99": "@999,999.99" as I want see and "999,999.99" as I can insert.
- C)If mask not present, input follows another way
I think all of us must investigate to find a solution for this object (and, if needed, losing some HMG3 backward compatibility).
Cheers