<br><font size=2 face="sans-serif">Perhaps use activate event on the tabPanel
to update the gridContainer<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Robert Buckley <robertdbuckley@yahoo.com>@geoext.org</b>
</font>
<br><font size=1 face="sans-serif">Envoyé par : users-bounces@geoext.org</font>
<p><font size=1 face="sans-serif">2011-04-04 15:04</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">users@geoext.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">[Users] load different grid on tabPanel
event listener</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><font size=2 color=#40007f face="Arial">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>
</font><font size=2 color=red face="Arial"> listeners:
{'beforetabchange': function(tabPanel, tab){<br>
<br>
var tabname=this.activeTab.titel<br>
<br>
switch (tabname)<br>
{<br>
case WEA:<br>
what do it code here?<br>
break;<br>
case Biogas:<br>
what do it code here?<br>
break;<br>
case Wasserkraft:
<br>
what do it code here?<br>
break;<br>
<br>
} </font><font size=2 color=#40007f face="Arial"><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>
});</font>
<br><font size=2 color=#40007f face="Arial"><br>
<br>
Cheers for any help!<br>
<br>
Rob</font><tt><font size=2>_______________________________________________<br>
Users mailing list<br>
Users@geoext.org<br>
http://www.geoext.org/cgi-bin/mailman/listinfo/users<br>
</font></tt>
<br>
<br>
<br>