Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to hide the entire tab on Tabstrip control?

Status
Not open for further replies.

vladk

Programmer
Joined
May 1, 2001
Messages
991
Location
US
Thank you!
 
Try,
Code:
SSTab1.TabVisible(<index>)= False
where the index is the index of the tab you want to hide.

zemp
 
Sorry, that's for the Tabbed Dialog control not the tab strip control.

zemp
 
Use the remove method of the Tabs Collection.

TabStrip1.Tabs.Remove intTabIndexToRemove

&quot;Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.&quot;
 
DrJavaJoe,

I tried this method. It removes the tab, not hides it. I believe, I would need to recreate the tab from the scratch in this case.

Vladk

 
Have you considered switching your tabstrip control? I started using the SStab (tabbed dialog) control and have never looked back.

zemp
 
When you say create from scratch are you implying that you are putting the controls on the tabstrip? The tabstrip control is not a container so you should be placing the controls on a frame or picturebox then changing the visible property of the frame or picture box as appropriate. If you want to add a tab to the tabstrip just use the add method of the Tabs Collection. Now this could be a whole lot easier just using the SSTab as zemp mentioned.

&quot;Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.&quot;
 
DrJavaJoe,
I assumed tab specific properties like caption or key. Yes, I was aware of the fact that Tabstrip is not a container but your reply convinced me that Remove method is not bad alternative for the not existing Visible property in this case.

zemp,

Yes, I did. I am working with existing project that utilizes Tabstrip.

Thank you!
 
One thing that is nice about the tabstrip is that it has a nice look to it when incorporating XP Themes.

&quot;Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top