extjs4 - Extjs: Dynamically add item to cycle button -


Using exts I am creating a circle button generation time I was adding three menu items to this circle button I'm following this,

Ext.create ('Ext.button.Cycle', {a code for id: 'trneMapCycleBtn', showText: true, flex: 2, Tooltip: "Click here to change range", prependText: ', menu: {id:' scene type-menu ', item: [{text:' districts', checked: true, tootip: "Delhi districts border ", Type:" getDistricts "}, {text: 'status', to otip: "Delhi State border", type: "getStates"}, {text: 'circles', tootip: "Delhi circles after its creation, I'm reaching this cycle button using my ID later Trying to add a menu item,

createItemForGeoJason () {} on MENUITEM = New Ext.menu. CheckItem ({text: geoJsonLayerName, id: 'geoJsonItem', handler: function (MENUITEM) {var layer = map.getLayersByName (myTrendMapSelectedLayer); layer [0] .setVisibility (wrong); On Layer1 = map.getLayersByName (geoJsonLayerName); Layer1 [0] .setVisibility (true); }});
Ext.getCmp ('View-type-menu'). Add (menuItem); }

You must overwrite the add menu item, because the button does not add functions to the square is . Try it out:

  Ext.getCmp ('View-type-menu'). Menu.add (menuItem);    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -