Hey,
How can I make a tab page invisible or at least disable it depending on a condition. The visible property doesn't seem to be working.
Printable View
Hey,
How can I make a tab page invisible or at least disable it depending on a condition. The visible property doesn't seem to be working.
You can set the .Enabled property to False to disable all controls on the desired tab.
VB Code:
Me.Tab1.TabPages.Item(2).Enabled = False
Setting either the Visible or Enabled property doesn't do anything.
I simply remove the tab page during the formloading if required.
Thanks,
You can remove the page but then your index will change if you Add it back again. Setting the .Enabled property does disable all controls that are on the page. If you dont have any controls on the page then it will not be appearant that its doing anything.
It's the last page so the index will always be the same.
I kind of need it not shown as oppose to disabled.
Thanks a lot for your replies.
Strange bug I think as I tested it and .Visible and .Hide do not have any effect on a tab page. .Enabled does so I guess your only left with .RemoveAt.