unit gsticky;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, ComCtrls;
type
Tsticky =
class(TCustomControl)
constructor Create(AOwner: TComponent);
override;
destructor Destroy;
override;
procedure Paint;
override;
private
FirstDraw: boolean;
stickynote: TRichEdit;
procedure SetParent(AParent: TWinControl);
override;
// <--------
public
end;
constructor Tsticky.Create(AOwner: TComponent);
begin
inherited Create(Aowner);
imageresDLL := LoadLibrary(PChar('
imageres.dll'));
stickynote := TRichEdit.Create(self);
stickynote.Parent := Self;
end;
procedure Tsticky.SetParent(AParent: TWinControl);
begin
inherited SetParent(AParent);
if (AParent =
nil)
then
Exit;
stickynote.Enabled := true;
stickynote.Left := 60;
stickynote.Top := 10;
stickynote.Width := 80;
stickynote.Height := 45;
stickynote.Color := clLime;
stickynote.BorderStyle := BsNone;
end;