Default Tab

5 posts, 0 answers
  1. seedy
    seedy avatar
    9 posts
    Member since:
    Feb 2007

    Posted 07 May 2007 Link to this post

    I must be missing something obvious, but I cant seem to find a way to set which tab is defaulted at startup.
  2. Johan
    Johan avatar
    617 posts
    Member since:
    Mar 2007

    Posted 08 May 2007 Link to this post

    Upon form loading, you can use something similar to this:

    radRibbonBar1.RibbonBarElement.TabStripElement.SelectedTab = radRibbonBar1.RibbonBarElement.TabStripElement.Items[0];

    or this

    TabItem item = radRibbonBar1.RibbonBarElement.TabStripElement.Items[1] as TabItem;
    item.IsSelected = true;

    I have also not found the way to do this at design time (could not located the IsSelected property in the PropertyGrid per TabItem)
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 08 May 2007 Link to this post

    Hello Corey,

    Selecting a tab can be done even easier like:

    this.radRibbonBar1.RibbonBarElement.TabStripElement.SelectedTab = this.tabItem1;

    All the best,

    Jordan
    the telerik team


    Instantly find answers to your questions at the new Telerik Support Center
  5. seedy
    seedy avatar
    9 posts
    Member since:
    Feb 2007

    Posted 08 May 2007 Link to this post

    Ok I'll give those a try, although my problem seems to have disappeared for now. 

    What I was seeing was that after I had created a second and third tab, it was actually the second tab that was opened by default, without me having any code in place doing so.  I just launched it this morning, and it looks like the first tab is defaulting now, so im not sure what happened there.

    thanks
  6. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 08 May 2007 Link to this post

    Hello Seedy,

    The problem you experienced might be due to problems with the Visual Studio Design Time environment and you can try to solve them by restarting the VS.NET environment. If you have experienced any other similar problems don't hesitate to write us further.

    Regards,
    Evtim
    the Telerik team

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