TabControl/TabPage VisibleChanged event problem

G

Guest

I am using the VisibleChanged event of the tabpage to add/remove main menu
bar items. When I receive the visiblechanged event and the visible=true I
add the main menu item and when I receive the event and visible=false I
remove the main menu item.

Everything works great, switching between the tabs works great. The problem
comes in when I remove a tabpage from the tabcontrol. The tabpage receives
one final visiblechanged event with visible set to true and I add the menu
item back to the main menu. Is this a bug in the framework? The tab page is
not in fact visible, but I don't receive any further visiblechanged events to
indicate this.

Any one have any work arounds for this? Any other suggestions on how to
implement main menu items for each tab page? Or any other suggestion on how
to hide a tab on the tab control without removing it.

Thanks,

Tom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top