Results 1 to 4 of 4

Thread: Help using tabs VS2012

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    24

    Question Help using tabs VS2012

    Hello,

    I am wondeirng if there is a function to enable/disable tabs individually. I know there is an "enable/disable" option in the properties menu but that seems to either enable or disable all of the tabs (which I do not want).

    I would like to be able to... On the start up of my app, have the "Description" tab (1st tab) and the "Calibration" tab (2nd tab) enabled so the user's file can still be loaded and have all of the other tabs disabled. After the file is loaded, the rest of the tabs are enabled.

    Any help would be appreciated, thank you in advance.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Help using tabs VS2012

    You cannot disable tabs in a TabControl by default. Check this out for some tips on customising a TabControl:

    http://dotnetrix.co.uk/tabcontrol.htm
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    24

    Re: Help using tabs VS2012

    Thank you! although I personally think they should implement such functionality in a future patch, I appreciate the help.

  4. #4
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: Help using tabs VS2012

    A simple solution is enable/disable the controls in the tabs

    Code:
            For j As Integer = 2 To TabControl1.TabCount - 1
                For Each ctl As Control In TabControl1.TabPages(j).Controls
                    ctl.Enabled = False
                Next
            Next



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width