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

 
 
Herramientas Buscar en Tema Desplegado
  #10  
Antiguo 09-05-2017
Franceszco Franceszco is offline
Registrado
NULL
 
Registrado: may 2017
Posts: 6
Poder: 0
Franceszco Va por buen camino
Código Delphi [-]
  if not TryStrToInt( LabeledEdit1.Text, a) then
    raise Exception.Create('El primer número es inválido');

  if not TryStrToInt( LabeledEdit2.Text, b) ...
  ...

  LabeledEdit3.Text := IntToStr( a + b );

En esta parte de la suma, me piden que se realice de StringGrid1 a StringGrid2

Estoy intentando algo asi, pero no me va...


Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var x,a,y,i:integer;
begin

   begin
   for i :=1 to Length(LabeledEdit1.Text) do
    StringGrid1.Cells[StringGrid1.ColCount -i, 0] := LabeledEdit1.Text[ Length( LabeledEdit1.Text )-i+1 ];
   end;
   begin
   for i :=1 to Length(LabeledEdit2.Text) do
    StringGrid2.Cells[StringGrid2.ColCount -i, 0] := LabeledEdit2.Text[ Length( LabeledEdit2.Text )-i+1 ];

   end;
    begin
   for x:=Length(LabeledEdit1.Text) to Length(LabeledEdit2.Text) do
    begin
   LabeledEdit3.text:= IntToStr(StrToInt(stringgrid1.cells[StringGrid1.ColCount -i, 0]) + StrToInt(stringgrid2.cells[StringGrid2.ColCount-i, 0]));
   inc(i);
    end;
    end;
    begin

       for i :=1 to Length(LabeledEdit3.Text) do
        StringGrid3.Cells[StringGrid3.ColCount -i, 0] := LabeledEdit3.Text[ Length( LabeledEdit3.Text )-i+1 ];
end;





end;

  end.
Responder Con Cita
 


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
Ayuda con un StringGrid maky Lazarus, FreePascal, Kylix, etc. 6 27-08-2008 18:45:59
ayuda stringgrid Rasecma Varios 1 18-10-2007 10:12:56
Ayuda en el Uso del StringGrid doncowboy OOP 2 24-04-2007 19:26:33
Ayuda con Stringgrid estebanx OOP 4 01-06-2006 20:20:24
Ayuda en StringGrid Fita Varios 3 08-11-2003 13:03:18


La franja horaria es GMT +2. Ahora son las 15:14:00.


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