Subject | Re: [IBO] TIB_Grid: Autofill on date fields |
---|---|
Author | Wolfgang Rohdewald |
Post date | 2007-01-29T02:30:08Z |
On Sunday 28 January 2007 23:40, Alan McDonald wrote:
"Now" - there would be a risk that the user forgets to enter the correct
date.
However normally the date falls into the current month. So as soon as
the user presses the first key in the date field the current date can be filled
in - not before.
This is exactly the behaviour defined by the TIB_Date.AutoFill property,
I just want to have this not only in a stand alone TIB_Date (there it
works fine for me) but also in a date grid column.
Actually I need more than that. AutoFill is also active if there already
was a valid date in the field, overwriting that with the current date.
It should not do that.
The longer I think about it the more I believe I have to write my own
InplaceEditor. This is about entering lots of dates. Using the mouse is
out of the question, and as few key presses as possible should be needed.
--
Wolfgang
> not sure what you mean by "pre-fill" - do you mean that the grid hasYes, it is mostly about new records. However I cannot simply initialize it with
> existing records you want to overwrite? or do you mean when a new record is
> inserted? if the latter then just use the query oninsert event to assign
> SysUtils.Now to the field.
"Now" - there would be a risk that the user forgets to enter the correct
date.
However normally the date falls into the current month. So as soon as
the user presses the first key in the date field the current date can be filled
in - not before.
This is exactly the behaviour defined by the TIB_Date.AutoFill property,
I just want to have this not only in a stand alone TIB_Date (there it
works fine for me) but also in a date grid column.
Actually I need more than that. AutoFill is also active if there already
was a valid date in the field, overwriting that with the current date.
It should not do that.
The longer I think about it the more I believe I have to write my own
InplaceEditor. This is about entering lots of dates. Using the mouse is
out of the question, and as few key presses as possible should be needed.
--
Wolfgang