Chcę zrobić komponent, który będzie rysował tekst (jak memo). Dodałem właściwość lines w Object inspector , przy próbie dodania czegoś do listy pojawia się błąd.
Próbowałem na różne sposoby, ale zawsze pojawiały się błędy. :-(
Bardzo proszę o pomoc i przykłady!!!!
Podajękod komponentu
unit Mojkomponent;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TMojkomponent = class(TGraphicControl)
private
FLines: TStrings;
procedure SetLines(Value: TStrings);
protected
public
constructor Create(AOwner : TComponent); override;
destructor Destroy; override;
published
property Lines: TStrings read FLines write SetLines default nil;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Standard', [TMojkomponent]);
end;
constructor TMojkomponent.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
end;
destructor TMojkomponent.Destroy;
begin
inherited Destroy;
end;
procedure TMojkomponent.SetLines(Value: TStrings);
begin
end;
end.