<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#40007f;">Hi,<br><br>I have a viewport which holds a tabbed panel and a panel for a grid. <br>The tabbed panel holds 3 different mappanels.<br>I would like to load a different grid according to which mappanel is set to active.<br><br>I can kind of see where I could program this but can see which events need to be fired.<br><br>Can anyopne help?,<br><br>here is my code so far...<br><br>my grids are "named grid_wea", "grid_biogas", and "grid_wasser "<br><br> // mapPanels<br> var mapPanel_wea = new GeoExt.MapPanel({<br> title:'WEA',<br>
map: map_wea,<br> extent: extent,<br> numZoomLevels: 5,<br> layers: [mapnik,layer_wea],<br> items:[]<br> });<br> <br> var
mapPanel_biogas = new GeoExt.MapPanel({<br> title:'Biogas',<br> map: map_biogas,<br> extent: extent,<br> numZoomLevels: 5,<br> layers: [mapnik1, layer_biogas]<br> });<br>
<br> var mapPanel_wasser = new GeoExt.MapPanel({<br> title:'Wasserkraft',<br> map: map_wasser,<br> extent: extent,<br> numZoomLevels: 5,<br> layers: [mapnik2, layer_wasser]<br>
});<br> <br> var gridContainer = new Ext.Panel({<br> region:'west',<br> width:400,<br> autoHeight:true,<br> items:[]<br> });<br> <br><br> var centerTabPanel = new Ext.TabPanel({<br>
region:'center',<br> width: 800,<br> autoScroll: false, <br> activeTab: 0,<br> items:[mapPanel_wea, mapPanel_biogas, mapPanel_wasser],<br><br> <span style="color: rgb(255, 0, 0);"> listeners: {'beforetabchange': function(tabPanel, tab){</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> </span><br style="color: rgb(255, 0, 0);"> <span
style="color: rgb(255, 0, 0);"> var tabname=this.activeTab.titel</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
switch (tabname)</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
{</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
case WEA:</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
what do it code here?</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
break;</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
case Biogas:</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
what do it code here?</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
break;</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
case Wasserkraft: </span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
what do it code here?</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
break;</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
} </span><br> <br> }<br> }<br> <br> <br> <br> });<br><br> var viewport = new
Ext.Viewport({<br> layout: "border",<br> split: true,<br> items: [gridContainer,centerTabPanel]<br> });<br><div><br><br>Cheers for any help!<br><br>Rob<br></div>
</div></body></html>