Ver Mensaje Individual
  #3  
Antiguo 11-06-2013
Alejandro73 Alejandro73 is offline
Miembro
 
Registrado: abr 2006
Ubicación: Valparaiso - CHILE
Posts: 132
Reputación: 19
Alejandro73 Va por buen camino
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;
__________________
Los muertos en CRISTO de sus tumbas volveran y los que vivimos en las nubes nos levantara .......
Responder Con Cita