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.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)