PDA

View Full Version : I have problem with "tbar" in EXT 3.0



TAG
18 Jul 2009, 6:15 AM
hello,
I use Ext Js 2.0 for my "Big Application":D. I remove Ext Js 2.0 and install Ext Js 3.0. But my application crashed, don't START......I split my application into pieces and the problem now is this:
I create 4 Ext.Button and insert this button in tbar of my panel...but toolbar result
empty of button when I start the application. The code is:

Ext.onReady(function(){
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
Ext.QuickTips.init();

var HomeAzienda=new Ext.Button({
text: 'Home',
tooltip: 'Home Page',
iconCls: 'home',
handler: function(){
fun_Home();
}});
var Apri=new Ext.Button({
tooltip: 'Apri',
iconCls: 'apri',
handler: function(){
fun_Apri();
}});
var Nuovo=new Ext.Button({
tooltip: 'Nuovo',
iconCls: 'nuovo',
handler: function(){
ApriNuovoDiagramma();
}});
var Salva=new Ext.Button({
tooltip: 'Salva',
iconCls: 'salva',
handler: function(){
fun_Salva();
}});

var ContenitoreSuperiore=new Ext.Panel({
region:'north', id:'Pulsanti', split: true, height: 50,
minSize: 50, maxSize: 50, collapsible: false,
frame: true, title: 'Editor', margins:'1 1 1 1',
border: true, tbar: [ HomeAzienda,'|',Apri,Nuovo,Salva]
});

var viewport = new Ext.Viewport({//genero un nuovo Viewport
layout:'border',items:[ContenitoreSuperiore]
});
...............

I don't undestand why don' view button in toolbar?

MD
18 Jul 2009, 7:26 AM
I gave your code a quick try, and it works perfectly fine here in 3.0. I just added 'text' values for the buttons so I could see them more easily in lieu of iconCls, and added placeholders for the remaining border layout regions. You're not seeing *anything* in the tbar?


Ext.onReady(function(){

Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
Ext.QuickTips.init();

var HomeAzienda=new Ext.Button({
text: 'Home',
tooltip: 'Home Page',
iconCls: 'home',
handler: function(){
fun_Home();
}});

var Apri=new Ext.Button({
text: 'Apri',
tooltip: 'Apri',
iconCls: 'apri',
handler: function(){
fun_Apri();
}});

var Nuovo=new Ext.Button({
text: 'Nuovo',
tooltip: 'Nuovo',
iconCls: 'nuovo',
handler: function(){
ApriNuovoDiagramma();
}});

var Salva=new Ext.Button({
text: 'Salva',
tooltip: 'Salva',
iconCls: 'salva',
handler: function(){
fun_Salva();
}});

var ContenitoreSuperiore=new Ext.Panel({
region:'north', id:'Pulsanti', split: true, height: 50,
minSize: 50, maxSize: 50, collapsible: false,
frame: true, title: 'Editor', margins:'1 1 1 1',
border: true, tbar: [ HomeAzienda,'|',Apri,Nuovo,Salva]
});

var viewport = new Ext.Viewport({
layout: 'border',
items: [
ContenitoreSuperiore,
{
region: 'south',
xtype: 'container',
layout: 'fit'
},{
region: 'east',
xtype: 'container',
layout: 'fit'
},{
region: 'west',
xtype: 'container',
layout: 'fit'
},{
region: 'center',
xtype: 'container',
layout: 'fit'
}
]
});

});

TAG
18 Jul 2009, 8:55 AM
Thanks,
I see my code and I undestand with problem is "autoWidth: true" in Panel, if I don't specific this parameter I see button in toolbar, but if I insert this option the toolbar appears empty......boh?????:-/

rbraddy
18 Jul 2009, 9:01 AM
I'm also having issues with "tbar" with grids in ExtJS 3.0...

From what I've narrowed this down to so far, when I add renderto: document.body, the grid and toolbars both work fine; however, with my ExtPanelGrid lazily connected to a Viewport panel, the grid and toolbar buttons aren't processing events...

Rick

TAG
18 Jul 2009, 9:01 AM
Ok, my problem is "I"....:D

I don't insert the panel center, west, east, etc...and autoWidth e autoHeight don't function




I'm sorry for my English, but thanks for the reply;)