Mam komponent StringGrid składający się z 6 kolumn. I jak zrobić, żeby w kolumnie 3, 4, 5 i 6 można było wpisywać tylko cyfry.
Zrobiłem coś takiego:
procedure TForm1.StringGridKeyPressed(ble ble ble);
begin
if (StringGrid.Col = 3) or (StringGrid.Col = 4) or
(StringGrid.Col = 5) or (StringGrid.Col = 6) then
begin
if not(Key in['0'..'9']) then
Key := #0;
end;
end;
no i ta procedurta działa w kolumnach: 4, 5 i 6 ale nie chce działać e kolumnie 3. Czy może ktoś wie o czemu? HELP