Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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
 
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
 
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


 
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

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


 
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




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 05:51 AM
tab control p2pMember ASP.NET 1.0 and 1.1 Basics 1 March 9th, 2006 06: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 07:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.