#ifdef 12 Posted February 23 I disabled both labels, but the panel does not respond if the cursor is over the label. How to fix it? Share this post Link to post
FPiette 383 Posted February 23 Select both label and panel to set MouseEnter and MouseLeave event handler or assign same event handler to both components. Share this post Link to post
Remy Lebeau 1394 Posted February 23 (edited) Just because the Labels are disabled does not mean the Panel will handle mouse activity when over them. You are still mousing over the Labels, so you need to catch and forward the event activity from the Labels if you want to handle them the same as events on the Panel. Otherwise, you can subclass the Panel to handle the underlying mouse messages before they get dispatched to children. Since the Panel is a windowed control and the Labels are graphical controls, the Panel is the one receiving the messages from the OS and passing them along to the Labels. Edited February 23 by Remy Lebeau 1 Share this post Link to post