Subject | Re: MS Money shortcuts in ib_date |
---|---|
Author | Marco Menardi |
Post date | 2004-08-20T12:31:29Z |
--- In IBObjects@yahoogroups.com, "bamberger_monjaude" <knoerzer@b...>
wrote:
procedure TIB_CustomDate.KeyPress(var Key: Char);
in the file:
IBC_Date.IMP.
I've seen that, when you have the calendar dropped down, "+" and "-"
shortcuts are supported. For current date, right now the shortcuts is
"space bar".
If Jason agrees, since seems a trivial patch, I could add your
proposed shortcuts, so for current date both spacebar and "*" will
work, and "+" and "-" will work also when calendar is not dropped.
BTW, would be nice have IBO shortcuts configurable with an, optional,
external file to be read at runtime...
Best regards
Marco Menardi
wrote:
> Hi,I suggest you to modify IBO source, looking at:
> i like to give my programms date shortcuts like ms money shortcuts.
> It means '*' for today, '+' for date + 1, '-' for date -1.
>
> I could do it in IB_Grid with changing then procedure
> TIB_GridInplaceEdit.KeyPress( var Key: Char ).
> I added then following lines:
>
> if (SelectedField.IsDateTime) and (Key = '*') then
> SelectedField.Value := now;
> if (SelectedField.IsDateTime) and (Key = '+') then
> SelectedField.Value := SelectedField.Value+1;
> if (SelectedField.IsDateTime) and (Key = '-') then
> SelectedField.Value := SelectedField.Value-1;
>
> But i couldn't find a solution for IB_Date. Has anyone an idea,
> where i can change the behavior of IB_Date to do this ?
>
> Thanks Elmar
procedure TIB_CustomDate.KeyPress(var Key: Char);
in the file:
IBC_Date.IMP.
I've seen that, when you have the calendar dropped down, "+" and "-"
shortcuts are supported. For current date, right now the shortcuts is
"space bar".
If Jason agrees, since seems a trivial patch, I could add your
proposed shortcuts, so for current date both spacebar and "*" will
work, and "+" and "-" will work also when calendar is not dropped.
BTW, would be nice have IBO shortcuts configurable with an, optional,
external file to be read at runtime...
Best regards
Marco Menardi