Subject Re: MS Money shortcuts in ib_date
Author Marco Menardi
--- In IBObjects@yahoogroups.com, "bamberger_monjaude" <knoerzer@b...>
wrote:
[cut]
>
> Hello Marco,
> thanks for your hint. I added the keys with the following code in the
> procedure TDatePick.ProcessKeyDown(var Message: TWMKeyDown)
>
> begin //...not active
> if ShiftState = [] then
> begin
> case CharCode of
> VK_MULTIPLY:
> begin
> FDate := SysUtils.Date;
> DoChange(dpOK);
> CharCode := 0;
> Result := 1;
> end;
> VK_SUBTRACT:
> begin
> FDate := FDate -1;
> DoChange(dpOK);
> CharCode := 0;
> Result := 1;
> end;
> VK_ADD:
> begin
> FDate := FDate + 1;
> DoChange(dpOK);
> CharCode := 0;
> Result := 1;
> end;
> end;
>
> and it works. Thanks a lot and with best regards
> Elmar

Seems you've found a better place where to put the patch... It also
surprises me that, with unbound control and empty value, "+" or "-"
don't generate an error.
I've fund only one "anomaly", but not your patch foult, that if you
press "+" some times, then "canc", then "+" again (or you could also
exit and re-enter the control), if you press "+" again it "recalls"
previous date.
Test it a little deeper, and send the code to Jason, with your
credits, for inclusion in the next release, if he likes it!
best regards
Marco Menardi