Hello,
I am using Lazarus 1.6 RC2 64 bits on Linux Mint. I found this issue: in Lazarus 1.4.4 this code worked fine:
procedure TForm1.DateFieldKeyPress(Sender:TObject; var Key:char);
begin
if (key >=#32) and not (key in ['0'..'9']) then key:=#47; // turn key into a '/'
end;
But in Lazarus 1.6 RC2, that code has no effect. Debugger shows that the key value is changed, but the field (a TEdit) do not receive this change (if I type a '-' key, the field shows a '-' character, even if debugger says that the key value was changed to '/').
However, in Lazarus 1.6 RC2, the following code does work: (the key value is changed to #0 and the key is ignored, as expected).
procedure TForm1.IntegerFieldKeyPress(Sender:TObject; var Key:char);
begin
if (key >=#32) and not (key in ['0'..'9']) then key:=#0; // ignore key
end;
Regards,
RayoGlauco