troubleshooting Question

Make This Component into a Package

Avatar of 4Rabbits
4Rabbits asked on
Delphi
10 Comments1 Solution650 ViewsLast Modified:
Hi Experts!?

a wile back kretzschmar, asked a question, Make a Hoverover Component.
http:Q_20485107.html

I'd like to put this into a Package so I can use it.

could anyone supply me with the contents of the package so I can copy and paste it and install?


The Contents he accepted was this.

 to add events

type
 THoverButton = class(TButton)
 private
   FHoverFont: TFont;
   FOldFont: TFont;
   FOnMouseEnter, FOnMouseLeave: TNotifyEvent;
 protected
   procedure CMMouseEnter(var Msg: TMessage); message CM_MOUSEENTER;
   procedure CMMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE;
 public
   constructor Create(AOwner: TComponent); override;
   destructor Destroy; override;
 published
   property HoverFont: TFont read FHoverFont write FHoverFont;
   property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
   property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave;
 end;

implementation

{ THoverButton }

constructor THoverButton.Create(AOwner: TComponent);
begin
 inherited;
 FHoverFont := TFont.Create;
 FOldFont := TFont.Create;
end;

destructor THoverButton.Destroy;
begin
 FHoverFont.Free;
 FOldFont.Free;
 inherited;
end;

procedure THoverButton.CMMouseEnter(var Msg: TMessage);
begin
 FOldFont.Assign(Font);
 Font.Assign(FHoverFont);
 if Assigned(FOnMouseEnter) then
  FOnMouseEnter(Self);
end;

procedure THoverButton.CMMouseLeave(var Msg: TMessage);
begin
 Font.Assign(FOldFont);
 if Assigned(FOnMouseLeave) then
  FOnMouseLeave(Self);
end;


=======

I just need this putting into a package, could anyone do it?






thanks
4R.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros