Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have problems creating a component, when i run mi app showing me the next Error : Error reading micomponent1.Texto property Texto does not Exist.

this is my code

Delphi
unit micomponent ;

Interface ;

 System.SysUtils, System.Classes, Vcl.Controls,Vcl.ExtCtrls,Vcl.StdCtrls,Vcl.Graphics,
 Vcl.Forms;

type
  Tmicomponent = class(TCustomControl)

Private
Ldescrip: Tlabel ;
FText: Tcaption ;
protected
Public
procedure SetTexto(Const value: TCaption);
constructor Create(AOwner:TComponent);override;

Published
property Texto:TCaption read FText write SetTexto  ;
end ;

procedure Register;

implementation

constructor Create(AOwner:TComponent);
begin
inherited ;
   self.Width:= 260 ;
   self.Height:= 180 ;
   ldescrip:= Tlabel.Create(nil);
   ldescrip.Parent:= Self ;
   ldescrip.AutoSize:= false ;
   ldescrip.Top:= 160 ;
   ldescrip.Left:= 5 ;
   ldescrip.Width:= 250 ;
   ldescrip.Transparent:= true ;
   ldescrip.Alignment:= tacenter ;
   ldescrip.Anchors:=[akLeft, akRight, akBottom];
   FText:= '' ;
end ;
 
procedure Tmicomponent.SetTexto(const Value: Tcaption) ;
begin
FText:= Value ;
end ;

procedure Register;
begin
  RegisterComponents('micomponent', [Tmicomponent]);
end;

end.
Posted
Updated 29-Apr-14 20:55pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900