Pues tengo definido un constructor para una clase que hereda de TPanel,y al intentar inicializar alguna de las propiedades heredadas me da error
Código Delphi
[-]
unit Tbarco;
interface
uses
Types, ExtCtrls, Classes, Controls;
type
Tbarco1 = class(TPanel)
private
dim : integer;
vert : boolean;
pro,pop : TPoint;
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
self.vert := false;
self.dim := dimens;
self.caption := ''; self.pro := Point(0,0);
self.pop := Point(0,0);
end;
end.
La llamada al constructor...
Código Delphi
[-]
b := Tbarco1.crear(2,2,2,2,2);
¿es que no se puede hacer ó es q lo estoy haciendo mal?
Gracias