Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 04-16-2005, 10:44 AM   #1 (permalink)
Insane
 
Location: West Virginia
[C#] Hiding a Tab

Okay I have the following:
Code:
private System.Windows.Forms.TabPage tab1;
And I need to hide this tab when a certain menu Item is clicked. In the code for the menuitem, I have the following:
Code:
tab1.Hide();
And nothing is happening. The other code I have contained in that same block is working fine, I just cant get the tab hidden.



Thanks
__________________

- Artsemis
~~~~~~~~~~~~~~~~~~~~
There are two keys to being the best:
1.) Never tell everything you know
Artsemis is offline  
Old 04-16-2005, 09:54 PM   #2 (permalink)
I am Winter Born
 
Pragma's Avatar
 
Location: Alexandria, VA
It's been a little bit since I've worked with C# doing Windows Forms, but the Tag object should have a "Visible" property - can you set it to false?
Pragma is offline  
Old 04-17-2005, 12:37 AM   #3 (permalink)
Insane
 
Location: West Virginia
No. There is a visible property for the tab controller that holds all of the tabs, but hiding it obviously hides all tabs.
__________________

- Artsemis
~~~~~~~~~~~~~~~~~~~~
There are two keys to being the best:
1.) Never tell everything you know
Artsemis is offline  
Old 04-17-2005, 08:04 PM   #4 (permalink)
Über-Rookie
 
Location: No longer, D.C
ugh.. I want to say I have done this, but I don't remember completely.

I can tell you a dirty hack to get the needed output. Build two Tab Containers and when they click something make one of them visible and hide the other one. This will basically just switch out the entire controller for the "new" one.
oblar is offline  
Old 04-17-2005, 11:59 PM   #5 (permalink)
Upright
 
Location: Boulder, Colorado
This might be what you want:

Code:
// "hide" tab page
tabControl1.TabPages.Remove(tabPage1);

// and to show it again, just re-add it to the collection:
tabControl1.TabPages.Add(tabPage1);
__________________
/K
ketamine is offline  
Old 04-18-2005, 11:18 AM   #6 (permalink)
Insane
 
Location: West Virginia
i love you
__________________

- Artsemis
~~~~~~~~~~~~~~~~~~~~
There are two keys to being the best:
1.) Never tell everything you know
Artsemis is offline  
 

Tags
hiding, tab

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 08:58 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57