Ver Mensaje Individual
  #4  
Antiguo 23-01-2007
SyncReuter SyncReuter is offline
Miembro
 
Registrado: ene 2007
Posts: 26
Reputación: 0
SyncReuter Va por buen camino
Hola, bueno realice el cambio en el codigo para probar, las lineas me quedaron asi:

Código Delphi [-]
x:=5;
  y:=21;
  for i:=1 to 7 do
    begin
      LabD[i]:=TLabel.Create(Self);
      LabD[i].Parent:=Self;
      LabD[i].AutoSize:=True;
      LabD[i].Caption:=CA_D[i];
      LabD[i].Alignment:=taCenter;
      LabD[i].Transparent:=True;
      LabD[i].ParentFont:=True;
      LabD[i].Width:=21;
      LabD[i].Height:=13;
      LabD[i].Top:=y;
      LabD[i].Left:=x;
      x:=x + LabD[i].Width + 2;
    end;

Lo compile y lo volvi a colocar dentro de la Form obteniendo el mismo resultado "Control has no parent window" . Tengo que decir ademas, que tengo 4 botones definidos en un array cuya creacion no da problemas. con el codigo:

Código Delphi [-]
x:=3;
  for i:=1 to 4 do
    begin
      BtnNave[i]:=TPrcBtnNave.Create(Self);
      with BtnNave[i] do
        begin
          Parent:=Self;
          Width:=15;
          Height:=15;
          Top:=3;
          //with ArrowOptions do
            begin
              case i of
                1: begin
                     Left:=x;
                     inc(x, Width + 1);
                     BtnNaveType:=bntPYear;
                   end;
                2: begin
                     Left:=x;
                     x:=cMCW - Width - 3;
                     BtnNaveType:=bntPMonth;
                   end;
                3: begin
                     Left:=x;
                     Dec(x, Width + 1);
                     BtnNaveType:=bntNYear
                   end;
                4: begin
                     Left:=x;
                     BtnNaveType:=bntNMonth;
                   end;
                end;
              //PosArrow:=paCenter;
              //ShowArrow:=True;
            end;

          Tag:=i;
          OnClick:=BtnNaveClick;
        end;
    end;

me tiene loco este maldito problema. Ya llevo mas de 5 horas cascandome la cabeza, la clase la hago una y otra vez obteniendo el mismo resultado.

Estoy usando Delphi 2005 Professional con el Update3

A todo esto de que forma trabaja TObjectList?

Gracias por su tiempo, saludos
Responder Con Cita