Информатика. Программирование в Delphi
128
procedure RadioButton2Click(Sender: Tobject);
procedure Button1Click(Sender: Tobject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: Tform1;
implementation
{$R *.dfm}
procedure TForm1.Edit1KeyPress(Sender: Tobject; var Key: Char);
begin
case key of
'0'..'9',#8:;
',','.':
begin
key:=DecimalSeparator;
if pos(key,Edit1.Text)<>0 then
key:=#0;
end;
#13:Edit2.SetFocus
else
key:=#0;
end;
end;
procedure TForm1.Edit2KeyPress(Sender: Tobject; var Key: Char);
begin
case key of
'0'..'9',#8:;
#13:Edit3.SetFocus
else
key:=#0;
end;
end;
procedure TForm1.Edit3KeyPress(Sender: Tobject; var Key: Char);
begin
case key of
I...,118,119,120,121,122,123,124,125,126,127 129,130,131,132,133,134,135,136,137,138,...370