Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 04-07-2013
Avatar de nlsgarcia
[nlsgarcia] nlsgarcia is offline
Miembro Premium
 
Registrado: feb 2007
Ubicación: Caracas, Venezuela
Posts: 2.206
Poder: 23
nlsgarcia Tiene un aura espectacularnlsgarcia Tiene un aura espectacular
avechuche,

Cita:
Empezado por avechuche
...agrego los valores correspondientes a las columnas de mi ListView...El problema esta que siempre me agrega la primer linea del ".txt"...
Revisa este código:
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
   i,j : Integer;
   StrList : TStringList;

begin

   ListView1.ViewStyle := vsReport;
   ListView1.Clear;

   with TStringList.Create do
   try
      LoadFromFile('ARCHIVO.TXT');
      StrList := TStringList.Create;
      for i := 0 to Count-1 do
      begin
         ExtractStrings(['|'], [], PChar(Strings[i]), StrList);
         with ListView1.Items.Add do
         begin
            SubItems.Add(StrList.Strings[0]);
            SubItems.Add(StrList.Strings[1]);
            StrList.Clear;
         end;
      end;
      StrList.Free;
   finally
      Free;
   end;

end;
El código anterior es una variante del sugerido en el Msg #5 adaptada a un control TListView.

Espero sea útil

Nelson.
Responder Con Cita
  #2  
Antiguo 04-07-2013
avechuche avechuche is offline
Miembro
NULL
 
Registrado: may 2013
Posts: 23
Poder: 0
avechuche Va por buen camino
Aaaaa mira vos asi se hace mas cortito! Muchas gracias gente por la ayuda. Ahora achico codigo como loco
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
¿como parsear texto? JXJ Varios 9 31-08-2010 22:31:02
parsear xml + clase DOMParser gustavoh JAVA 0 27-07-2006 15:39:25
Duda Tstring wildnetboy C++ Builder 9 16-06-2006 21:19:46
Convertir un TString a PWideChar bustio OOP 3 01-10-2004 04:50:16
TString en los caption buitrago Varios 3 14-08-2004 19:54:13


La franja horaria es GMT +2. Ahora son las 23:27:20.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi