TabControl.Visible / Hide() not working, and won't be fixed **ever**?!?

Read this bug report please. Sometimes I'm amazed at the things they do in the name of "backwards compatibility"...


  • I don't get it either!

  • I can understand how it would be a breaking change. The issue is that underneath the scenes, a TabPage is hidden whenever it is not the current selected tab. If they were to change this behavior, it could break code. For example, any code that tests to see if a TabPage is not selected by checking the Visible property would break. Yes, it's a bad way to test for the selected tab, but a breaking change either way.

    However, I would love to see this fixed - I think having the fix break existing code, while possible, is very unlikely.

  • Ha! That's right! That's the reason then... fairly unbelievable overloaded usage of the Visible property, eh? (from the TabControl, that is... they should have NEVER used that property to indicate something that is completely different than for all other controls in WinForms!!!)

  • I it seems to cause databinding problems for controls placed on TabPages - something about databinding hidden controls.

    It almost seems like it was done on purpose, because it would have been fairly simple to implement correctly if the Control.Visible property was virtual.

Comments have been disabled for this content.