95 pts.
 Can tab pages in a tab control can be individually enabled or disabled?
In my project developed using VB.NET 2005 there is a tab control with 4 tab pages. I need to call a method which will enable/disable those tab pages according the some boolean values referring to each tab page. For example if boolean value 1 is true the tab page 1 is enabled and users can operate it. 
I tried this on code but there's no Enabled property for tab pages. So is it possible in an alternative way? If it's possible how?


Software/Hardware used:
VB.NET 2005
ASKED: August 19, 2009  6:06 AM
UPDATED: November 7, 2009  11:45 AM

Answer Wiki:
I don't know of a way to disable tabs, but you could remove them from the tab pages collection and add them back as needed. Something like this: <pre> 'Store the tab in a variable before removing it some_page = TabControl1.TabPages(0) 'Remove it TabControl1.TabPages.Remove(TabControl1.TabPages(0))</pre> <pre> 'Insert the tab into the collection. This will insert it into the first position 'If the tab order is not important, you could use the Add method instead TabControl1.TabPages.Insert(0, some_page)</pre>
Last Wiki Answer Submitted:  August 19, 2009  8:09 am  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

we have 4 tabpages in our mdi child form1. we want to click on main form btton then the control transfer to the tab page2 on child form.how we do that ?

 10 pts.