PDA

View Full Version : Manually Set Selected Item look inTabBar?



Bucs
27 Jan 2011, 10:20 AM
Is there anyway to manually change the selected tab CSS rather than rely on the tabbar to automatically do this? Reason being I need some additional buttons on the tabbar that don't have associated cards, but the functionality is needed there so I have added buttons to the tabbar along with the cards.

TabBar config looks like so:


{
xtype: 'viewHome',
iconCls: 'home'
},
{
xtype: 'viewSearch',
iconCls: 'search'
},
{
xtype: 'button',
title: 'Same Day',
iconCls: 'star',
handler: ''
},
{
xtype: 'button',
title: 'Cart',
iconCls: 'user',
handler: ''
}
]


The tabbar handles the selected (active) look for you, but seems to only do this if the item is truly a loaded xtype panel. So, I am looking for away to manually set the active tab look.

Any ideas? I tried to do an addCls('.x-tab-active') on the button after pressed but this did nothing.

jessetc
27 Jan 2011, 6:47 PM
I'm not sure of this will work, but give this a try. Hopefully it works.

change handler:'' to handler: 'auto' in both locations.

I tried posting the code but it kept putting all of it into two lines. I couldn't figure out how to generate the scroll box that you did. New to the forum. :P

Bucs
28 Jan 2011, 4:21 AM
I'm honored to get your first post and all, but no that didn't do anything :) Curious, what led you to think that would work?

Thanks for trying tho.