I'd like some help on the following two items:
1. On a 'DBEdit', related to a date-field, i have an EditMask like
'99/99/9999;1; ', with a ShortDateFormat like 'dd/mm/yyyy'. It is
working fine, but for one thing. Is does not allow me to enter an empty
value. When the field is originally empty is does not complain, but when
it isn't and i want to make it empty (clear) is does not allow me to.
Is there a way to enable this also?
2. What is the preferred (?) way to have a string-field-edit behave like
a fixed-floating type numeric?
What i mean is this. I want to enter some data (as a float) and let the
edit-control (when i exit the control) adjust (round) the data to some
fixed number of decimals. I played some time with the function
FloatToStrF() in the OnValidate-function for the field in the dataset
(setting the fieldvalue or the edit-control-text-value) and it seems to
work during the OnValidate (on screen the editcontrol changes to the
wanted format), but when the next control gets focus eventually, the
editcontrol has changed back to exact the data i typed into it, with no
rounding or formatting what so ever.
I haven't figured this out, but my gut feeling says it should be easy.
Anyone figured this out for me?
Thanks in advance,