|
-
Jun 21st, 2007, 03:48 PM
#1
Thread Starter
Hyperactive Member
disabling tabs
Hi there,
I am trying to figure out how to disable a tab in a tabControl. I thought tab.hide() would do it but that totally has no effect. Am I missing something?
Thanks
-
Jun 21st, 2007, 06:29 PM
#2
Lively Member
Re: disabling tabs
try this:
Code:
button1.TabStop = false;
-
Jun 21st, 2007, 07:15 PM
#3
Re: disabling tabs
 Originally Posted by mikelynch
try this:
Code:
button1.TabStop = false;
A TabPage control is totally different than the "Tab" key.
Anyway, try this code:
Code:
//To remove/hide a TabPage
tabControl1.TabPages.Remove(tabPage2);
//To Show the invisible TabPage again
if ( !tabControl1.TabPages.Contains(tabPage2) )
tabControl1.TabPages.Add(tabPage2);
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jun 21st, 2007, 07:17 PM
#4
Re: disabling tabs
You cannot hide or disable tabs in a TabControl. You can disable a TabPage but the user can still select that tab; they just can't use any controls on it. If you want to "hide" a TabPage then you have to remove it from the TabControl. You can easily insert it back again later so it's no big deal. If you were to inherit the TabControl you could add functionality to do that internally.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|