Board index » delphi » Newbie quation "simple mousover effect"

Newbie quation "simple mousover effect"

Hi,

If I have a TLabel called Label12 and I use a OnMouseMove event handler to
change the label's font colour from black to red with

begin
     Label12.Font.Color := clRed;
end;

how can I get the font colour of Label12 back to its inital black colour
when the mouse rolls off it please?

best   Graham

 

Re:Newbie quation "simple mousover effect"


use OnMouseEnter and OnMouseLeave instead

or...

in your Form's (or the label's parent) OnMouseMove event use this:

begin
  Label12.Font.Color := clWIndowText;
end;

Quote
webmas...@international-it-directory.com wrote:

> Hi,

> If I have a TLabel called Label12 and I use a OnMouseMove event handler to
> change the label's font colour from black to red with

> begin
>      Label12.Font.Color := clRed;
> end;

> how can I get the font colour of Label12 back to its inital black colour
> when the mouse rolls off it please?

> best   Graham

--

This one was dead black, and in this, nothing moved.

Re:Newbie quation "simple mousover effect"


Many thanks!!

Quote
"Jellowe" <j...@pirchworld.com> wrote in message

news:3DACA930.C1778531@pirchworld.com...
Quote
> use OnMouseEnter and OnMouseLeave instead

> or...

> in your Form's (or the label's parent) OnMouseMove event use this:

> begin
>   Label12.Font.Color := clWIndowText;
> end;

> webmas...@international-it-directory.com wrote:

> > Hi,

> > If I have a TLabel called Label12 and I use a OnMouseMove event handler
to
> > change the label's font colour from black to red with

> > begin
> >      Label12.Font.Color := clRed;
> > end;

> > how can I get the font colour of Label12 back to its inital black colour
> > when the mouse rolls off it please?

> > best   Graham

> --

> This one was dead black, and in this, nothing moved.

Other Threads