You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to look for way on how to change the BackColor of a Panel Header on MouseHover specifically when Collapsed=true but can't find any. There are MouseEnter, MouseLeave and MouseHover but they all apply to the body of the Panel.
Is it possible or I am just missing something that is not so obvious?
I tried both MouseEnter and MouseHover on the header of a collapsed panel and get the events back in both cases. Are you attaching to the event or using OnMouseHover?
Yes, both MouseEnter and MouseHover work so with MouseLeave. But they only work on the body of the Panel. What I am looking for is an event when the mouse is over the Header of the Panel or thru javascript.
I am using a simple code as:
private void panel2_MouseLeave(object sender, EventArgs e)
{
panel2.BackColor = System.Drawing.Color.White;
}
private void panel2_MouseEnter(object sender, EventArgs e)
{
panel2.BackColor = System.Drawing.Color.BlanchedAlmond;
}
Thanks and have a nice weekend.
Hi Cris, the issue is that MouseEnter and MouseLeave don’t fire when the pointer is over the header? That’s what I have tried. http://demo.wisej.com/apps/paneltest.html
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2016-11-16 17:38:02 UTC
Hi Cris,
I tried both MouseEnter and MouseHover on the header of a collapsed panel and get the events back in both cases. Are you attaching to the event or using OnMouseHover?
/Luca
itg-assistant commentedon Jun 12, 2026
Cris answered 2016-11-18 18:27:12 UTC
Hi Luca,
Yes, both MouseEnter and MouseHover work so with MouseLeave. But they only work on the body of the Panel. What I am looking for is an event when the mouse is over the Header of the Panel or thru javascript.
I am using a simple code as:
itg-assistant commentedon Jun 12, 2026
Luca answered 2016-11-18 18:39:19 UTC
Hi Cris, the issue is that MouseEnter and MouseLeave don’t fire when the pointer is over the header? That’s what I have tried. http://demo.wisej.com/apps/paneltest.html
itg-assistant commentedon Jun 12, 2026
Cris answered 2016-11-18 18:45:17 UTC
Hi Luca,
I got the same behaviour in my test.