Ver Mensaje Individual
  #7  
Antiguo 08-02-2006
modulay modulay is offline
Miembro
 
Registrado: feb 2006
Posts: 46
Reputación: 0
modulay Va por buen camino
Me refiero a lo siguiente:
Ahora mi clase tiene un atributo Timage:

Código Delphi [-]

unit Tbarco;

interface

uses
  Types, ExtCtrls, Classes, Controls;

type
  Tbarco1 = class(TPanel)
private
  dim : integer;
  vert : boolean;
  pro,pop : TPoint;
  imagen : Timage;
public
  property dimension : integer read dim write dim;
  property vertical : boolean read vert write vert;
  property proa : TPoint read pro write pro;
  property popa : TPoint read pop write pop;
  constructor crear(dimens,x,y,ancho,alto : integer);
end;


implementation

  constructor Tbarco1.crear(dimens,x,y,ancho,alto : integer);
  begin
    inherited Create(nil);
    self.vert := false;
    self.dim := dimens;
    self.pro := Point(0,0);
    self.pop := Point(0,0);
    self.Width := ancho;
    self.Height := alto;
    self.Left := x;
    self.Top := y;
    self.AutoSize := true;
    self.caption := '';
    self.Cursor := crHandPoint;
  end;

end.

Tal y como está implementado el tema,si yo llamo a barco.crear(x,x,x,x,x) ¿se llama automáticamente al constructor de imagen?
Responder Con Cita