Connecting Tech Pros Worldwide Forums | Help | Site Map

Wierd problem with tab alignment and button leave event

Flack
Guest
 
Posts: n/a
#1: Nov 17 '05
Hello,

I encountered a strange problem and I do not know what is causing it.

I created an empty form, added a tabs control to it and set the tab control
dock style to fill. Then I added three tabpages to it. To the first tab page
I added three buttons. The first button's click handler would set the tab
control's tab alignment to TabAlignment.Left and the second buttons click
handler would set it to Bottom.

I added mouse enter and mouse leave handlers to the third button. Whenever
the mouse would enter or leave the button, I would use Debug.WriteLine to
write a message.

Now, when I start the form, the mouse enter/leave events work great and
everything is fine. However, once I change the tabs alignment by hitting one
of the first two buttons, the third button no longer fires it's mouse leave
event. The mouse enters and mouse enter fires correctly, but it seems that
the mouse leave event has been unregistered when the tab control's tab
alignment changed.

Does anyone know what can be causing this behavior?

Thanks,
-Flack

Closed Thread