Disabling tab control

mac4_life

Member
Joined
Jun 21, 2005
Messages
13
Programming Experience
1-3
Hello,
I have a tab control on my winform. On one of my tabs, I am performing a two step process, and do not want the user to be able to change the tab until I tell them to. I see I can actually disable the tab pages, and that disables everything on the tabpage, but I want to stop the user from even changing tabs.
 
You can't. You would have to use the SelectedIndexChanged event handler of the TabControl to reset the SelectedIndex based on some condition that you define. In my opinion it is not a good idea to use the TabControl in this way. It was designed to allow many controls to occupy less space. If you are performing a multi-step operation, I think it is better to do it using a wizard style interface, which can be implemented using Panels that get hidden and shown as needed.
 
Actually you can. Using a custom tab control like this one (bottom of page) you can disable and enable certain tabs. When disabled you can't even enter the tab page.
 
Back
Top