
(*
 Delphi Object and Component Reference
# {bmc bm9.BMP} Row, Rows example
This example displays a string grid, a list box, and a button on a form. When the application runs, strings are put in the cells of row 1 of the string grid. When the user clicks the button, The strings in the current row of the grid are displayed in the list box.
Note that when the grid contains an empty cell, the list box has a corresponding empty string.
*) 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  ListBox1->Items = StringGrid1->Rows[StringGrid1->Row];
}
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  StringGrid1->Cells[1][0] = "Column 1";
  StringGrid1->Cells[2][0] = "Column 2";
  StringGrid1->Cells[3][0] = "Column 3";
  StringGrid1->Cells[4][0] = "Column 4";
  StringGrid1->Cells[0][1] = "Row 1";
  StringGrid1->Cells[1][1] = "C++";
  StringGrid1->Cells[2][1] = "Builder";
  StringGrid1->Cells[3][1] = "is";
  StringGrid1->Cells[4][1] = "RAD";
  StringGrid1->Cells[0][2] = "Row 2";
  StringGrid1->Cells[1][2] = "Rapid";
  StringGrid1->Cells[2][2] = "Application";
  StringGrid1->Cells[4][2] = "Development";
} 
