Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Tabstrip (obsolete as of Q2 2010) > Selected Tab Border Bottom

Not answered Selected Tab Border Bottom

Feed from this thread
  • Patrick Barranis avatar

    Posted on Jun 4, 2010 (permalink)

    Hey everyone,

           I am using the Office2010 theme in my application and am running into a problem with the selected tab on RadTabStrips.  The problem I have is that the default theme has a border at the bottom of the selected tab AND the on the top of the ContentPanel.  I could remove the bottom border on the tab, but the top border of the panel would still exist.  I don't want to remove the entire top border with the Panel, just the area right below the tab.  I have seen this effect happen with the other default themes, so I'm wondering if there is something I can change to get this look.  I hope that's clear, as it is hard to see the which tab is selected if the border between the tab and content panel exists.  The color changes, but that isn't too accessible to colorblind people.  Any ideas?   Thanks!

    Reply

  • Stefan Stefan admin's avatar

    Posted on Jun 9, 2010 (permalink)

    Hello Patrick Barranis,

    Thank you for your question.

    Please refer to the following code snippet. It implements the solution to your request:

    public RadForm1()
            {
                InitializeComponent();
                this.Load += new EventHandler(RadForm1_Load);
            }
            TabItem previousTab;
     
            void RadForm1_Load(object sender, EventArgs e)
            {
                SetMargin((TabItem)this.radTabStrip1.SelectedTab);
                previousTab = (TabItem)this.radTabStrip1.SelectedTab;
            }
     
            private void radTabStrip1_TabSelected(object sender, TabEventArgs args)
            {
                SetMargin((TabItem)args.TabItem);
                previousTab.Margin = new Padding(0);
                previousTab.Children[2].Children[0].Margin = new Padding(0, 0, 0, 0);
                previousTab = (TabItem)args.TabItem;
            }
     
            private void SetMargin(TabItem tabItem)
            {
                tabItem.Margin = new Padding(0, 0, 0, -2);
                tabItem.Children[2].Children[0].Margin = new Padding(0, 0, 0, 2);
            }

    I hope this helps. If you have any other questions, feel free to contact us.

     

    Best wishes,
    Stefan
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Tabstrip (obsolete as of Q2 2010) > Selected Tab Border Bottom
Related resources for "Selected Tab Border Bottom"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]