The only remaing part that I do not change to object is about grid
I do not understand this part
I do not understand if default values comes from a default control or not.
FUNCTION _GridEx_SET_DEFAULT_COLUMN_CONTROL (cControlName , cParentForm, nControl)
LOCAL k, DefaultData
LOCAL i := GetControlIndex(cControlName,cParentForm)
LOCAL nColumnCount := _GridEx_ColumnCount(cControlName,cParentForm)
...
IF nControl == _GRID_COLUMN_ONHEADCLICK_ .OR. nControl == _GRID_COLUMN_HEADER_ .OR. nControl == _GRID_COLUMN_HEADER2_ .OR. nControl == _GRID_COLUMN_HEADERIMAGE_ .OR. nControl == _GRID_COLUMN_JUSTIFY_
IF Valtype (_HMG_SYSDATA [ nControl ] [i]) == "A"
FOR k = 1 TO nColumnCount
IF Valtype (_HMG_SYSDATA [ nControl ] [i] [k]) == "U"
_HMG_SYSDATA [ nControl ] [i] [k] := DefaultData
ENDIF
NEXT
ENDIF
ELSE
IF Valtype (ControlByIndex( I ):CTRL040 [ nControl ]) == "A"
FOR k = 1 TO nColumnCount
IF Valtype (ControlByIndex( I ):CTRL040 [ nControl ] [k]) == "U"
ControlByIndex( I ):CTRL040 [ nControl ] [k] := DefaultData
ENDIF
NEXT
ENDIF
ENDIF
RETURN NIL