PDA

View Full Version : vertical toolbar how?



wki01
24 Sep 2009, 7:18 AM
The only way I found is to put one of the buttons below another. The effect is rather ugly. (the color of each button is gray instead of blue)

Is there a way to create a vertical toolbar?

thanks

thanks

Animal
24 Sep 2009, 8:01 AM
Try just adding the class "x-toolbar" to that Panel.

Or, you create an actual Toolbar. Just use a different layout. Maybe anchor so that you can use defaults: {anchor:'100%'}

Just use it as the sole item of that accordion Panel. (Make sure it is layout:'fit')

wki01
25 Sep 2009, 12:13 AM
Try just adding the class "x-toolbar" to that Panel



It works very well.
But now the buttons are different lengths ...
how to have the buttons all the same length?

thanks

Animal
25 Sep 2009, 12:38 AM
Use a layout?

wki01
25 Sep 2009, 1:08 AM
Use a layout?



var panelQuadri = new Ext.Panel({
frame : true,
title : 'Quadri',
collapsible : true,
titleCollapse : true,
collapsed : false,
layout : 'anchor',
cls : "x-toolbar",
defaults : {
anchor : "100%",
xtype : "button",
iconCls : "icon-new16"
},
items : [{
text : 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
handler : function() {
}
}, {
text : 'bbbbbbb',
handler : function() {
Fox.sidecenter
.m_add(Fox.panelAnagrafica
.m_init())
}
}, {
text : 'cccccccc',



if I use the layout "anchor" instead of the default, the buttons have the text centered.
I wish that was left.

thanks

Animal
25 Sep 2009, 2:16 AM
Buttons centre their text due to their default CSS style rules.

You might have to provide your own CSS rules for buttons in your special Panel.