本文介绍了读取micomponent.Texto属性时出错.Texto不存在。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在创建组件时遇到问题,当我运行mi app时显示下一个错误:错误读取micomponent1.Texto属性Texto不存在。



这是我的代码



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

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.

推荐答案

这篇关于读取micomponent.Texto属性时出错.Texto不存在。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 19:16