-
28 Oct 2007 12:43 AM #1
adding a toolbar menue
adding a toolbar menue
Hi everybody

i try to add a toolbar menue to an existing Desctop window but nothing gone!
my code :
please helpCode:createDesigner : function(src){ var desktop = this.app.getDesktop(); var win = desktop.getWindow('bogus'+src.windowId); var menu = new Ext.menu.Menu({ //<-------------- My code id: 'mainMenu', //<-------------- My code items: [ //<-------------- My code { //<-------------- My code text: 'I like Ext', //<-------------- My code checked: true, //<-------------- My code }, //<-------------- My code { //<-------------- My code text: 'Ext for jQuery', //<-------------- My code checked: true, //<-------------- My code //checkHandler: onItemCheck //<-------------- My code } ] }); var tb = new Ext.Toolbar(); //<-------------- My code tb.render('toolbar'); //<-------------- My code tb.add({ //<-------------- My code text:'Button w/ Menu', //<-------------- My code iconCls: 'bmenu', //<-------------- My code menu: menu //<-------------- My code }); //<-------------- My code if(!win){ win = desktop.createWindow({ id: 'bogus'+src.windowId, title:src.text, width:640, height:480, html : '<div id="toolbar"></div>', iconCls: 'bogus', shim:true, animCollapse:true, constrainHeader:true, //item : tb //items: //ajout des items composant }); } win.show(); },
-
28 Oct 2007 1:28 AM #2
I change my code to
an i got the toolbar naw haw can i add a menue to this tool bar?Code:createDesigner : function(src){ var desktop = this.app.getDesktop(); var win = desktop.getWindow('bogus'+src.windowId); if(!win){ win = desktop.createWindow({ id: 'bogus'+src.windowId, title:src.text, width:640, height:480, // html : '<iframe id="sampleframe" name="sampleframe" width="100%" height="100%" frameborder="2" src="Modules/tt/ExtStart.html" style="border: 0px solid #cecece;"></iframe>', iconCls: 'bogus', shim:true, animCollapse:true, constrainHeader:true, tbar:[{ tooltip:{title:'File Menue', text:'This is the File Menue!'}, text:'File' },'-',{ tooltip:'Add a new user', text:'Edit' }] }); } win.show(); },
i try
but it dont workCode:tbar:[{ tooltip:{title:'File Menue', text:'This is the File Menue!'}, text:'File' menu:.... },'-',{ tooltip:'Add a new user', text:'Edit' menu:.... }]
THKS


Reply With Quote