точнее через KeyDown
Код | procedure ts(t:Tstringgrid); var i,a: integer; s,s1: string; begin i:=system.Length(t.Cells[t.Col,t.Row]); a:=0; s1:=''; s:=t.Cells[t.Col,t.Row]; if s<>'' then begin repeat inc(a); if (ord(s[a])>=48) and (ord(s[a])<58)then s1:=s1+s[a]; // if s[a]='.' then s1:=s1+','; until i=a; t.Cells[t.Col,t.Row]:=s1; windows.keybd_event(113,0,0,0); end; end;
|
вводит один символ и только, да и точку на запятую не заменяет
Добавлено через 10 минут и 39 секунд
Цитата(Данкинг @ 29.3.2011, 23:02) | А если значение заменить обычным StringReplace? |
надо попробовать
|