From RAD Studio API Documentation
Jump to: navigation, search


property Objects[ACol, ARow: Integer]: TObject read GetObjects write SetObjects;


__property System::TObject* Objects[int ACol][int ARow] = {read=GetObjects, write=SetObjects};


Type Visibility Source Unit Parent
property public
Vcl.Grids TStringGrid


Lists the objects for each cell in the grid.

Use the Objects property to access the object associated with a particular cell. The ColCount and RowCount properties (inherited from TCustomGrid) define the size of the array of objects. ACol is the column coordinate of the cell, and ARow is the row coordinate of the cell, where the first column is column 0, and the first row is row 0.

Add an object to the Objects array like this:

MyStringGrid.Objects[i,j]:= TMYThing.Create(); //Delphi
MyStringGrid->Objects[i][j] = new TMYThing(); //C++

Note: The string grid does not own the objects in the Objects array. Objects added to the Objects array still exist even if the string grid is destroyed. They must be explicitly destroyed by the application.

See Also

Code Examples