How to select a tab programmatically?

3 posts, 0 answers
  1. Donovan Bell
    Donovan Bell avatar
    29 posts
    Member since:
    Jul 2005

    Posted 25 Jan 2008 Link to this post

    Hi,

    Is there a special trick to programatically select a tab? I've tried the PerformClick() method to no avail.

    Thanks
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 28 Jan 2008 Link to this post

    Hi Donovan,

    In order to select a tab programmatically you should use set the SelectedTab property of RadTabStrip as in the example below:

    DockPresenterElement presenter = ((DockPresenterControl)activeControl).DockPresenterElement; 
       foreach (TabItem tab in presenter.TabStripElement.Items) 
       { 
           if (tab.HitTest(activeControl.PointToClient(clickPoint))) 
           { 
                 presenter.TabStripElement.SelectedTab = tab; 
           } 
       } 
     

    I've forwarded this to the documentation team to include it in the help files.

    Please, don't hesitate to write us back if you have further questions.

    Best wishes,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Donovan Bell
    Donovan Bell avatar
    29 posts
    Member since:
    Jul 2005

    Posted 29 Jan 2008 Link to this post

    Great Thanks ... Worked.
Back to Top