This is a migrated thread and some comments may be shown as answers.

Selected Tab Border Bottom

1 Answer 113 Views
Tabstrip (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Patrick Barranis
Top achievements
Rank 1
Patrick Barranis asked on 04 Jun 2010, 11:42 PM
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!

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 10 Jun 2010, 04:54 AM
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.
Tags
Tabstrip (obsolete as of Q2 2010)
Asked by
Patrick Barranis
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or