Hi, I discovered a strange behaviour on D5 that differs from D4 and is causing
me a few headaches.
I have a StringGrid based component, and in the KeyPress method that I'm
overriding I have the following code:
procedure TVerticalDBGrid.KeyPress(var Key: Char);
begin
Datasource.Dataset.Edit;
FieldByDisplayName(Cells[0,Row]).AsString := Cells[1,Row];
inherited KeyPress(Key);
end;
Under D4 Cells[1,Row] would return the string in the cell as you'd expect, but
under D5, the returned string doesn't include the key you just pressed. So
instead of getting "Test" I get "Tes", which as you could imagine is playing
havoc on my databases.
I'll probably _fudge_ this and change to code to be Cells[1,Row]+Key but I was
wondering if anyone knew why the behaviour of the method had changed, or if I
should be accessing the cells contents in a different way?
Thanks,
Mark
--
Thou they try, they shall never take me alive.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz