Board index » delphi » How do you Add Object to TStingGrid.Objects[] ?
Clark Bremer
![]() Delphi Developer |
Tue, 21 Apr 1998 03:00:00 GMT
How do you Add Object to TStingGrid.Objects[] ?
I'm having trouble using the Objects array of a TStringGrid. I have a
TString grid that is 4x6, with string in all the cells ( I can see them on the screen). I want to store some additional information with each row, so I thought I'd crate my own object and attach it to the Objects propery of the cell in column zero. It compiles, but at runtime I get this: EStringSparseListError - PutObject to Undefined Item. Can anyone tell me what I'm doing wrong? Thanks in advance, CB. PS: Here's what my code looks like: type TMyClass = class(TObject) TMyForm = class(TForm) .. procedure TMyForm.MyMethod; begin If I stop the de{*word*81} at the *, I see: |