procedure TFrmCustoms.StringGrid1KeyPress(Sender: TObject; var Key: Char);
begin
if not (key in ['0'..'9',#46,#8,#13 ])and ((StringGrid1.Col=4) or (StringGrid1.Col=5)) then
begin
Key := #0; // 屏蔽按键;
end;
end;
begin
if not (key in ['0'..'9',#46,#8,#13 ])and ((StringGrid1.Col=4) or (StringGrid1.Col=5)) then
begin
Key := #0; // 屏蔽按键;
end;
end;
Key:=#0;