tszwang
asked on
Disable tab
May I know how to disable one of the tabs in a tab control? In other words, if I have four tabs inside a tab control, how can I disable one of them? :) Cheers! :)
ASKER
Hi vattal,
Well, that is another control... do you know how to do it with the standard Tab control? Thank you very much in advance! :)
Well, that is another control... do you know how to do it with the standard Tab control? Thank you very much in advance! :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Instead of using the above macros, you can use corresponding tab control messages: TCM_DELETEITEM, TCM_INSERTITEM.
Laminamia
Laminamia
By disabling you want to make it appear disabled and then act disabled as well. Ther eis no built in way to do this. But by overrriding the click method of the tab control you can screen out switching to the tab, and by owner drawing you can make it look disabled. A lot of work for somethign that should really be built in. If the tab to disable is active when it becomes disabled, then you have to switch out of it or act accordingly.
Kavorka is right. Like I said, you can't disable it without deleting using the built in functions. kavorka's thoughts on how to make it look and act disabled are intriguing, yet, as kavorka said, that's a lot of work for something that should be built in.
http://www.codeguru.com/controls/STabCtrl.shtml
and
http://www.codeguru.com/mfc/comments/5305.shtml
Hope this helps
Adarsh S