.NETGURU
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




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification