TabControl Hiding Tabs
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngwebcontrols' list.


Chuck Peper
Did anyone figure out how to hide tabs on the MS tab control?

Reply to this message...
 
    
ToddC@match.com
What do you mean hide?

Don't create them is one way.

tc

-----Original Message-----
From: Chuck Peper [mailto:Click here to reveal e-mail address]
Sent: Monday, August 12, 2002 1:56 PM
To: aspngwebcontrols
Subject: [aspngwebcontrols] TabControl Hiding Tabs

Did anyone figure out how to hide tabs on the MS tab control?

| [aspngwebcontrols] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngwebcontrols.asp = JOIN/QUIT

Reply to this message...
 
    
Chuck Peper
I have a tabstrip used in conjunction with a multipage
control.

Based on a selection in a drop down list in the form sometimes I would
like to display 4 tabs sometimse 5 tabs.

In my aspx page I define the tabstrip and multipage.
In the code behind I declare:
Protected tabSysEng As Microsoft.Web.UI.WebControls.Tab

In the page load I do this
If idontwantTabFunction Then
If TabStrip1.Items.Contains(tabSysEng) Then TabStrip1.Items.Remove
(tabSysEng)
Else
If Not TabStrip1.Items.Contains(tabSysEng) Then abStrip1.Items.AddAt
(4, tabSysEng)
End If

This appears to work until, I remove and then re-add the
tab (a few postbacks), then the tab never goes away. Also
the tab doesn't get placed at tabcount=4 it gets placed at
tabcount=3. I can watch the code step through, it sees
the tab and executes the remove statement, but the tab
count never changes and the tab is not removed.

In article <696843@aspngwebcontrols>, Click here to reveal e-mail address says...
[Original message clipped]

Reply to this message...
 
    
Muneer Natha
Assume you have:

<mytab:TabStrip id="tsHoriz" runat="server" TargetID="mpHoriz" ...>
    <mytab:Tab ID="tab_1" ....></mytab:Tab>
    <mytab:TabSeparator ID="ts1"></mytab:TabSeparator>
    <mytab:Tab ID="tab_2" ....></mytab:Tab>
    <mytab:TabSeparator ID="ts2"></mytab:TabSeparator>
    <mytab:Tab ID="tab_3" ....></mytab:Tab>
    <mytab:TabSeparator ID="ts3"></mytab:TabSeparator>

To eliminate the 2nd tab, remove the tab and tab separator by:
    tsHoriz.Items.Remove(tab_2);
    tsHoriz.Items.Remove(ts2);

-----Original Message-----
From: Click here to reveal e-mail address [mailto:Click here to reveal e-mail address]
Sent: 12 August 2002 11:38 PM
To: aspngwebcontrols
Subject: [aspngwebcontrols] RE: TabControl Hiding Tabs

What do you mean hide?

Don't create them is one way.

tc

-----Original Message-----
From: Chuck Peper [mailto:Click here to reveal e-mail address]
Sent: Monday, August 12, 2002 1:56 PM
To: aspngwebcontrols
Subject: [aspngwebcontrols] TabControl Hiding Tabs

Did anyone figure out how to hide tabs on the MS tab control?

| [aspngwebcontrols] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngwebcontrols.asp = JOIN/QUIT

| [aspngwebcontrols] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngwebcontrols.asp = JOIN/QUIT

Reply to this message...
 
 
System.Windows.Forms.TabControl




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com