07.02.2008, 22:12
|
|
Новичок
|
|
Регистрация: 18.07.2007
Сообщения: 51
Репутация: 15
|
|
Код:
Case Key of
'.',',':
begin
If Key<>DecimalSeparator then Key:=DecimalSeparator;
If (Length (Edit1.Text)=0)or(Edit1.Text=Edit1.SelText) then Key:=Chr (0);
If pos(DecimalSeparator,Edit1.SelText)<>0 then exit;
If pos(DecimalSeparator,Edit1.Text)<>0 then Key:=Chr(0);
end;
...
|