Jump to content

uniPanel childcomponents - OnMouseEnter / OnMouseLeave


erich.wanker

Recommended Posts

Hi ,

i user uniPanel - OnMouseEnter / OnMouseLeave Events to change color and size ..

 

 

meinpanel.OnMouseEnter:=meinPanelsEnter;
meinpanel.OnMouseLeave:=meinPanelsLeave;

 

 
procedure TMainForm.meinPanelsEnter(Sender: TObject);
begin
(sender as Tunipanel).Color:=clgray;
(sender as Tunipanel).Height:=(100);


unipanel3.ReCalculateAligns;
end;
 

 

procedure TMainForm.meinPanelsLeave(Sender: TObject);
begin
(sender as Tunipanel).Color:=clsilver;
(sender as Tunipanel).Height:=(52);


unipanel3.ReCalculateAligns;
end;
 

 

but if the panel has a lot of child-components (uniEdit,uniLabel ..) the "onMouseLeave" event wil be send (correctly) ..

 

How can i tell the unipanel not to change the color then i move the mouse over childcomponents of the panel ?

 

thank you

 

Erich

 

Link to comment
Share on other sites

sorry for my poor description ..

my issue:

 

i want to change the color of panels, if the mouse is over the panel or leaves the panel.

- but the panel flickers between the 2 colors if the mouse moves over the childcomponents of a panel..

 

as example:

i have 10 panels, on every panel are uniEdit uniLabel ect.. components ...

if i move the mouse over the screen, the panels are flickering 100 times or more becouse the onMouseleave Event is allways send, wenn the mouse is over a component .. 

 

i just want to "hover" the panel, if the mouse is in the panel rectangle - no matter which childcomponent of the unipanel

 

 

 

Thank you

Erich

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...