PDA

View Full Version : Toolbar with a lot of items



Hacker-CB
19 Aug 2009, 6:33 AM
How can i add a lot of items in the toolbar if it is not enough space for them?
Can the toolbar have two lines?

23 Aug 2009, 1:11 PM
The toolbar can use whatever layout that you want to.

That said, there is something called button groups that you can use. See the Examples and API for detailos.

Hacker-CB
23 Aug 2009, 11:53 PM
I can't find examples with custom layout in toolbar.
Can I use standart container layout (table,column, etc) in toolbar?

Animal
24 Aug 2009, 12:18 AM
Have you tried?

24 Aug 2009, 3:32 AM
Have you tried?

My sentiments exactly!

Hacker-CB
24 Aug 2009, 3:36 AM
This does not work:

tbar: new Ext.Toolbar({
layout: 'border',
items: [
{
region: 'north',
items: [
'aaaa'
]
},{
region: 'south',
items: [
'bbb'
]
}

]
})

24 Aug 2009, 3:39 AM
This does not work:

tbar: new Ext.Toolbar({
layout: 'border',
items: [
{
region: 'north',
items: [
'aaaa'
]
},{
region: 'south',
items: [
'bbb'
]
}

]
})

did you check firebug? The border layout requires a center region.

24 Aug 2009, 3:42 AM
try this:


new Ext.Window({
width : 400,
height : 300,
tbar : new Ext.Toolbar({
height : 100,
layout: 'border',
items: [
{ region : 'north' , text : 'bbbb' },
{ region : 'center' , text : 'aaaa' }

]
})
}).show()

24 Aug 2009, 3:43 AM
The problem with your example is that you're specifying a button with no text with the region north and south. Also, buttons are not containers.

Hacker-CB
24 Aug 2009, 3:43 AM
with center it does not work to...
here is example:
http://demo.sokolov.me/listview/list-view.html
http://demo.sokolov.me/listview/list-view.js

Hacker-CB
24 Aug 2009, 3:46 AM
try this:


new Ext.Window({
width : 400,
height : 300,
tbar : new Ext.Toolbar({
height : 100,
layout: 'border',
items: [
{ region : 'north' , text : 'bbbb' },
{ region : 'center' , text : 'aaaa' }

]
})
}).show()

fine. it works!! thamk you!

24 Aug 2009, 3:47 AM
with center it does not work to...
here is example:
http://demo.sokolov.me/listview/list-view.html
http://demo.sokolov.me/listview/list-view.js

It works for me.