How to get focus on a new tab added to Radstrip?

2 posts, 0 answers
  1. Era
    Era avatar
    1 posts
    Member since:
    Apr 2008

    Posted 03 Apr 2008 Link to this post

    Hi,

    I am new to RadControls.

    In my code base, I have created a tabstrips and an "Add Tab" button. 
    I have also set scroll property of Tabstrip to allow scrolling.

    On click of the "Add Tab" button I programmatically add a new tab item to the tabstrip and select it. However, I cannot get focus on the newly added tab.
    If the count of tabs grows, I need to scroll to the added tab.

    Is there some way by which at the time of selecting a tab I also set focus on it?

    Any help shall be appreciated.

    Thanks in anticipation,

    Era
  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 03 Apr 2008 Link to this post

    Hi Era,

    Thank you for writing.

    We have already implementd programmatic scrolling to a desired tab in the RadTabStrip. It will be a part of our Q1 2008 release, due in mid-April. Currently, I could suggest adding a new tab at the first position. In this way, it will always be visible.

    Please take a look at code-block below as reference:

    private void radButton1_Click(object sender, EventArgs e)  
    {  
        TabItem tab = new TabItem(String.Format("Tab{0}",this.radTabStrip1.Items.Count + 1));  
        this.radTabStrip1.Items.Insert(0, tab);  
        this.radTabStrip1.SelectedTab = tab;  

    I hope this helps. If you have additional question, do not hesitate to contact me again.

    Sincerely yours,
    Martin Vasilev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top