PDA

View Full Version : Two level toolbar



ZeusTheTrueGod
7 Mar 2010, 11:05 AM
I am going to make a 2 level top toolbar. first level contains 'breadcrumbs' element which can be rendered using Ext.DomHelper without Ext.Component and another one is a normal one toolbar with buttons and so on. Breadcrumbs could be, for example,


{tag:'div', class:'breadcrumb', items:[{tag:'a',href:'...',html:'level1'},{tag:'b',href:'...',html:'level2'}]
}


In fact, i am adding to a panel one more dom element above tbar.Two levels are independent. Just one toolbar above another one.

I see this ways:
1st. Make a panel inside a panel. Each panel can have a toolbar, so I will achieve a visual effect but I will have a wrapper
2nd. Modifiy the tbar container with autoEl so there is a place where breadcrumbs el can be installed in afterrender event
3nd Build breadcrumbs using Ext.Components - vbox layout + Ext.ux.LinkButton and insert into wrapper from 1st option
4nd. Change tbar layout and allow it to have two levels

And, at last, I can don't use tbar at all. I can create two containers with toolbar or vbox layout and put them into items

Have anyone tried something similar? Any ideas what is easier for supporting application in future?

Animal
7 Mar 2010, 12:20 PM
Just use a layout other than "toolbar".

Such as flow layout: http://www.extjs.com/forum/showthread.php?p=396565#post396565