Registriert seit: 21. Aug 2003
7.332 Beiträge
Delphi 2009 Professional
|
Re: RichEdit erstellen, wenns auf die Form gezogen wird.
7. Jul 2004, 20:39
Wenns meinst:
Delphi-Quellcode:
unit Thumbnail;
interface
uses
SysUtils, Classes, Controls, ComCtrls, ShellCtrls;
type
TThumbnail = class(TShellListView)
private
{ Private-Deklarationen }
FRichEdit : TRichEdit;
protected
{ Protected-Deklarationen }
public
{ Public-Deklarationen }
constructor Create(AOwner : TComponent); override;
published
{ Published-Deklarationen }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents(' Spider', [TThumbnail]);
end;
{ TThumbnail }
constructor TThumbnail.Create(AOwner : TComponent);
begin
ViewStyle := vsList;
{ Erzeugen des RichEdits }
FRichEdit := TRichEdit.Create(AOwner);
FRichEdit.FreeNotification(Self);
FRichEdit.Parent := Self.Parent;
FRichEdit.Width := 100;
FRichEdit.Height := 100;
FRichEdit.Top := Top;
FRichEdit.Left := Left + Width;
inherited Create(AOwner);
end;
initialization
RegisterClass(TRichEdit);
finalization
UnregisterClass(TRichEdit);
//Das braucht wenn man die Kompo dynamisch erstellt.
end.
|
|
Zitat
|