CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    170

    Bringing a tabpage to the front?

    Hi all, I have a tab control where all the tabs are created dynamically at run time. this works great, however when a new tabpage is created and added to the tab control i need to make the new tabpage the front tab. I have tried using tabPage2.Focus(), tabPage2.Show(), tabPage2.Select(), I have also tried tabControl1.TabIndex = 1, tabControl1.Controls[0].SendToBack()Controls[1].BringToFront(),
    tabControl1.Controls[0].SendToBack()...
    I am out of ideas.

    How do I programatically bring a new tab to the front (as if the user had clicked on it)?

    thanks,

    Jim
    I am scifi

  2. #2
    Andy Tacker is offline More than "Just Another Member"
    Join Date
    Jun 2001
    Location
    55°50' N 37°39' E
    Posts
    1,503
    tabcontrol.selectedtab = yourtabpagename'
    If you think you CAN, you can, If you think you CAN'T, you are probably right.

    Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.

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

Featured