Ver Mensaje Individual
  #2  
Antiguo 06-06-2006
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 29
Lepe Va por buen camino
Código Delphi [-]

 for i:=low(ArPaneles) to high(ArPaneles) do // No uses el tipo de datos, sino la variable.
begin
   PnlImagen := TPanel.Create(PnlImagenes);
   PnlImagen.Parent := PnlImagenes;
   PnlImagen.Visible := true;

   Arpaneles[i] := pnlImagen; // guardas la referencia al panel creado. OJO ES UN PUNTERO.

   if i=0 then
     TamPanel(x,y,PnlImag) //Procedimiento que fija longitudes del panel
   else
     if i=1 then
       TamPanel(x div 2,y div 2,PnlImagen);

procedure TForm.CreaImagen(NumImag : Integer);
var
 i : integer;
begin
 
 for i:=0 to NUmImag-1 do
  begin
   Img := TImage.Create(ArPaneles[NImagenes]); //ahora si tiene un valor.
   Img.Parent := ArPaneles[NImagenes];//y aqui
   Img.Visible := true;
   Img.Align := alclient;
   Img.Stretch := true;
 end;
end;
Saludos
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.

Última edición por Lepe fecha: 06-06-2006 a las 11:23:32.
Responder Con Cita