<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>I am trying to add a button with a menu to my existing toolbar but unfortunately when I click on it the drawfeature control associated with the button won't fire and the pan tool stays active. If I just add the GeoExt.Action that adds redline directly
to the tbar this works, but if I add the menu with it it doesn't. Not sure what I am missing here just trying to get a menu because I want to allow the drawfeature to use options for a line or polygon. Any help appreciated.</div>
<div> </div>
<div> </div>
<div> </div>
<div>/ -------- Begin RedLine Menu ------------------------// </div>
<div> </div>
<div> //Redline Action</div>
<div> var action_RedLine = new GeoExt.Action({</div>
<div> text: "Redline",</div>
<div> control: drawFeature,</div>
<div> map: map,</div>
<div> // button options</div>
<div> toggleGroup: "tools",</div>
<div> allowDepress: false,</div>
<div> group: "tools"</div>
<div> });</div>
<div> </div>
<div> var menu = new Ext.menu.Menu({</div>
<div> id: 'basicMenu',</div>
<div> text: 'Redline Menu',</div>
<div> map: map,</div>
<div> items: [action_RedLine]</div>
<div> });</div>
<div> </div>
<div> var redline_button = new Ext.Button({</div>
<div> menu: menu,</div>
<div> toggleGroup: "tools",</div>
<div> allowDepress: false,</div>
<div> group: "tools",</div>
<div> map: map</div>
<div> });</div>
<div> </div>
<div>// ------ End Redline Menu --------------//</div>
<div> </div>
<div> var mapPanel = new GeoExt.MapPanel({</div>
<div> collapsed: false,</div>
<div> height: 800,</div>
<div> renderTo: '',</div>
<div> map: map,</div>
<div> center: lonLat,</div>
<div> zoom: startupLevel,</div>
<div> tbar:[action_Home, '-', action_Queries , '-', action_ZoomIn, '-', action_ZoomOut, '-', action_ZoomPrevious , '-', action_Pan, '-', action_CenterMap,</div>
<div> '-', action_FitMap, '-', redline_button, '-', action_Print, '-' , action_Help, '-' ,action_Tutorial]</div>
<div> });</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
</font>
<DIV><P><HR>
This e-mail is intended for the original recipient(s) only. If you have received it in error, please advise the sender and delete this message.
</P></DIV>
</body>
</html>