ActivetabRow remains on top after DHTMLXTabbar.normalize()

Hi
I have a lot of tabs in my application and these are generated dynamically via an xml. When i load this xml into a tabbar, it automatically sets activeTab for the tab with attribute selected=1. Now when i normalize it, as i do not want the scroller, the tabs wrap automatically but the activeTab row remains the topmost. If i select any tab now the row comes down automatically but the first time it remains on top.
I tried setting the activeTab again after normalizing but since its the same as lastActivetab, it does’nt go in the handler.
I changed the setActiveTab(TabId) call in the loadXMLString function to(TabId, false) so that it would go into the handler but since there is only one row in the XML, after normalizing it doesn’t affect the row positioning.
Also i may add, that the number of tabs is not fixed and hence i cannot predict the number of rows that may be formed after normalizing.

Any suggetion would be really helpful
Thanks
Kaul

Hi,

Are you using the latest version ? We have not reproduced the problem with it:

tabbar.loadXML(url,function(){
tabbar.normalize();
});

Could attach the complete demo if the problem is not solved?

Hi

I am using loadXMLString to load the tabbar. The xml that i pass as parameter is created dynamically.

Thanks

This is what i get

Tab1(active) Tab2 Tab3 Tab4 Tab5
Tab6 Tab7 Tab8 Tab 9
Tab10…

and this is what i want
Tab10…
Tab6 Tab7 Tab8 Tab 9
Tab1(active) Tab2 Tab3 Tab4 Tab5

this happens when the tabbar loads for the first time. now if i click on any other tab, it works fine.

Thanks

If you are using the latest vesion - v.3.0, please attach the complete demo that reproduces the problem.

I am using an older version. Sorry i did not mention it earlier.
Nonetheless i have changed the normalize function to get what i want. I created an array that calculates how many rows are created with the number of tabs it will have, before the actual row creation. Then i am using this array to manipulate the loop variable by adding another loop.

In this way i can create the row with the last of the tabs first and then the next which gives me what i want.

Thanks for taking interest. I shall post if i face any difficulty with the fix.
Thanks :slight_smile: