Hi Karl,
In the method GetEditObject() class DataColumn the #overwrite property of the cell editcontrol is set to OVERWRITE_ONKEY, and it seems that this setting causes the problem. Using a standalone "num decimal + OVERWRITE_ONKEY" SingleLineEdit control on a form shows excatly the same behaviour ! so I´m pretty sure, the problem is inside the singleLineEdit class and not the DataBrowser or DataColumn class.
A quick workaround might be this DataBrowser class. When a num value with decimal places is detected the #overwrite setting is changed to OVERWRITE_NEVER. it´s not perfect, but at least the decimal point problem should be solved.
Code: Select all
CLASS MyDataBrowser INHERIT DataBrowser
METHOD __BeginEditField(hWin AS PTR, dwChar AS DWORD) AS VOID PASCAL CLASS MyDataBrowser
SUPER:__BeginEditField(hWin , dwChar )
,
IF oCellEdit:FieldSpec != NULL_OBJECT
IF oCellEdit:FieldSpec:ValType == "N" .and. oCellEdit:FieldSpec:Decimals > 0
IVarPut(oCellEdit, #Overwrite, OVERWRITE_NEVER )
ENDIF
ENDIF
RETURN
BTW. Since I've been using the MatthiasSle class for decades, i´ve never seen this strange OVERWRITE_ONKEY behaviour. Searching the VO google group shows that Matthias even wrote a DataBrowser class that uses the MatthiasSle class instead of the SingleLineEdit class. Because the download location knowvo.com no longer exists, maybe Matthias jumps in ...
regards
Karl-Heinz