Results 1 to 5 of 5

Thread: Tab control Question (Easy)!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2002
    Posts
    142

    Tab control Question (Easy)!

    I have three tab pages in a a tab control. When I click a button, how do I get the second tab page to come to the front? I've tried bringtofront(), but it doesn't seem to do much.

  2. #2
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    tabcontrol1.selectedindex = {the tab you want}

    to step through the tabs in order, you can create a variable and increment it eith every click event and the {tab you want} will be the variable.

  3. #3
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    like this:

    VB Code:
    1. 'in Declarations
    2. public intIndex as integer = 0
    3.  
    4. 'in the button_click
    5. TabControl1.SelectedIndex = intIndex
    6.         intIndex += 1
    7.         If intIndex > 3 Then
    8.             intIndex = 0
    9.  
    10.         End If

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    May 2002
    Posts
    142

    Awesome!!

    Worked Awesome!!!
    .selectedindex was what I was looking for!

    Congrats on your daughter! 1-2 is such a fun age. My daughter just turned 2 and we had another daughter 3 weeks ago.

  5. #5
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    congrats to you too!!

    here's a trick a used to learn some of the things I've learned:

    I use the object browser and the msdn with vs.net. the help files tell you where the objects are in the namespace puzzle and the browser lists all the members.

    This forum has helped a TON but the browser has proved to be an invaluable tool.


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