Gracias
Ya revise este codigo
/* Mostrar selección en ListBox */ void __fastcall TForm1::Button1Click(TObject *Sender) { TGridRect GR = StringGrid1->Selection; AnsiString s; for(int f=GR.Top; f <= GR.Bottom; f++){ s= ""; for(int c=GR.Left; c <= GR.Right; c++) s = s + StringGrid1->Cells[f][c]; ListBox1->Items->Add(s); } }
pero no me queda claro como lo recorre con el for ya que marca error en "f=Gr.Top"
adjunto codigo del boton
Código Delphi
[-]
Grid : TbsSkinStringGrid;
Gr : TGridRect;
begin
Gr := Grid.Selection;
for(int f=GR.Top; f <= GR.Bottom; f++)
begin
s= "";
for(int c=GR.Left; c <= GR.Right; c++)
begin
s = s + StringGrid1->Cells[f][c];
ShowMessage(s);
end;
end;