1. #1
    Ext User libertux's Avatar
    Join Date
    Oct 2007
    Posts
    93
    Vote Rating
    0
    libertux is on a distinguished road

      0  

    Default 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 :
    Code:
    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();
        },
    please help

  2. #2
    Ext User libertux's Avatar
    Join Date
    Oct 2007
    Posts
    93
    Vote Rating
    0
    libertux is on a distinguished road

      0  

    Default


    I change my code to
    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();
        },
    an i got the toolbar naw haw can i add a menue to this tool bar?
    i try
    Code:
    tbar:[{
                        tooltip:{title:'File Menue', text:'This is the File Menue!'},
    					text:'File'
                                            menu:....
                    },'-',{
                        tooltip:'Add a new user',
                        text:'Edit'
                        menu:....
                    }]
    but it dont work
    THKS

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi