Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 10th, 2003, 02:16 PM
Authorized User
 
Join Date: Jun 2003
Location: Richardson, Texas, USA.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to disable a tab on a tab control.

Does anyone know how to disable a tab on a tab control but leave the others enabled.

Thanks,

David
Reply With Quote
  #2 (permalink)  
Old June 19th, 2003, 03:56 PM
Registered User
 
Join Date: Jun 2003
Location: St. Petersburg, FL, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

this makes all controls on the tab disabled:

        Me.TabControl1.TabPages(1).Enabled = False
Reply With Quote
  #3 (permalink)  
Old July 3rd, 2003, 11:14 AM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

is there a further property like TabIndex that you can lock onto to choose a specific tab in the array?

not sure
tek


Reply With Quote
  #4 (permalink)  
Old July 3rd, 2003, 07:50 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You to set the Enabled to true or false. The example below will answer your question

        Dim iTotalTabs = Me.TabControl1.TabCount()
        Dim X As Integer
        For X = 0 To iTotalTabs - 1
            With Me.TabControl1.TabPages(X)
                .Enabled = False
                If .Name = "TabPage2" Or .Name = "TabPage4" Then
                    .Enabled = True
                End If
            End With
        Next

Reply With Quote
  #5 (permalink)  
Old August 3rd, 2003, 09:15 PM
Authorized User
 
Join Date: Jun 2003
Location: Richardson, Texas, USA.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your replies,

David
Reply With Quote
  #6 (permalink)  
Old August 24th, 2003, 03:19 PM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hello, I try to disable a tabpages in vb.net but it doesn't work properly , if try to do this Me.TabControl1.TabPages(1).Enabled = False it let me enter to de tabpages ..please help as soon as posible.


Reply With Quote
  #7 (permalink)  
Old April 14th, 2011, 10:04 AM
Registered User
 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this out:

http://msdn.microsoft.com/en-us/library/252t3cec.aspx
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
tab control amey.agnihotri C# 2005 1 June 19th, 2007 04:10 AM
Tab Control prasanta2expert Access 4 November 27th, 2006 04:51 AM
tab control p2pMember ASP.NET 1.0 and 1.1 Basics 1 March 9th, 2006 05:39 AM
Tab Control Louisa VB.NET 2002/2003 Basics 4 September 26th, 2005 09:43 AM
Tab Control Bhanu .NET Framework 2.0 1 December 2nd, 2004 06:25 AM



All times are GMT -4. The time now is 03:24 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.