Subject Re: MS Money shortcuts in ib_date
Author Marco Menardi
--- In, "bamberger_monjaude" <knoerzer@b...>
> Hi,
> 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
I suggest you to modify IBO source, looking at:
procedure TIB_CustomDate.KeyPress(var Key: Char);
in the file:
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