Showing posts with label specific. Show all posts
Showing posts with label specific. Show all posts

Monday, March 26, 2012

Tab Control Change Tab Colors

I have a customer that wants the Tab Control to have specific colors for the tabs depending on which tab is clicked. I have been able to use the CssClass to get the hover to be the way they would like but the active tab they would like it to be a different color.

I have attempted to write VB behind code as follows

sub onTabChange(byval sender as object, byval e as system.eventargs)

Select Case TabContainer1.ActiveTab

Case 1

TabContainer1.CssClass = "ajax__tab_tab1"

Case 2

......

end sub

I have the Sub as the onActiveTabChange property of the tab control. I do not get any debugging stop in the code behind page or any indication that there is a call to the sub from the control.

I just need a way to change the colors on each tab depending on which tab is active.

Hi,

Please make sure the AutoPostBack property of the Tab control is set to true.

If this doesn't work, please post a stripped version of your page here.


The autopostback property was the resolution

Thank you.

Saturday, March 24, 2012

Tabcontainer - Setting focus on tabs after postback

Is it possible to set the focus to a specific tab after postback or in event handlers.

Any help with this problem will be greatly appreciated.

me.TabContainer1.Tabs(index).Focus, there is an ActiveTabChanged event in the code behind as well.

Is that what your looking for? Also a new video has been posted on the tabContainer in the video's section of this site.

Burl