<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16448"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#000080 size=2 face=Arial><SPAN
class=676301118-21092012>For now found a solution that is working for me
but seems that there should be a better, more generic way of doing this.
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#000080 size=2 face=Arial><SPAN
class=676301118-21092012>I wrote a function to just turn off all other active
controls (see below), but that I need now to put into every control handler
function to switch off other active control. Using events , listeneeres
and so forth there should be a better way. How would you go about this
?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#000080 size=2 face=Arial><SPAN
class=676301118-21092012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#000080 size=2 face=Arial><SPAN
class=676301118-21092012>Cheers</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#000080 size=2 face=Arial><SPAN
class=676301118-21092012>Karsten</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#000080 size=2 face=Arial><SPAN
class=676301118-21092012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#000080 size=2 face=Arial><SPAN
class=676301118-21092012>function deactivateToggleControls(){<BR>
for (eachControl in customToolPanel.controls)
{<BR> if
(customToolPanel.controls[eachControl].active)
{<BR>
customToolPanel.controls[eachControl].deactivate();<BR>
}<BR> }<BR>} </SPAN></FONT></DIV><FONT color=#000080 size=2
face=Arial></FONT><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> karsten [mailto:karsten@terragis.net]
<BR><B>Sent:</B> Thursday, September 20, 2012 11:51 PM<BR><B>To:</B>
'openlayers-users@lists.osgeo.org'<BR><B>Subject:</B> one control panel - mixed
control types - how to disable all others<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=234124506-21092012>Hi
All,</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=234124506-21092012></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=234124506-21092012>I am
not sure if it expected behavior if you have a panel with multiple
controls, some Type 'Button' plus others such as Control.MeasureNew and
Control.MouseDefaults that the last two deactivate once the other is
clicked, but the button type controls won't deactivate then
?</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN class=234124506-21092012>For
example when the user clicks son the 'MouseDefaults ' control then 'MeasureNew '
is deactivated (if it was active previously) , however clicking on any of
the button type controls does not deactivate 'MeasureNew'</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial></FONT> </DIV>
<DIV><SPAN class=234124506-21092012><FONT color=#000080 size=2 face=Arial>So I
was wondering </FONT></SPAN><FONT color=#000080 size=2 face=Arial><SPAN
class=234124506-21092012>what is the standard / or best way to have the button
controls when activated , deactivate all other controls ?</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=234124506-21092012></SPAN></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=234124506-21092012>Cheers</SPAN></FONT></DIV>
<DIV><FONT color=#000080 size=2 face=Arial><SPAN
class=234124506-21092012>Karsten</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV align=left>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 11pt">Karsten
Vennemann<BR></SPAN><SPAN
style="FONT-FAMILY: 'Verdana','sans-serif'; FONT-SIZE: 9pt">Principal<BR><BR><SPAN
style="COLOR: #003264">Terra GIS LTD<BR><A
title=blocked::http://www.terragis.net/ href="http://www.terragis.net/"><FONT
color=#0000ff>www.terragis.net</FONT></A></SPAN></SPAN><o:p></o:p></P></DIV>
<DIV> </DIV><br/><br/><br><br><FONT face="Tahoma" size="2"><br>=======<br>Email scanned by PC Tools - No viruses or spyware found.<br>(Email Guard: 9.0.0.2308, Virus/Spyware Database: 6.20640)<br><a href=http://www.pctools.com/?cclick=EmailFooterClean_51>http://www.pctools.com</a><br>=======</FONT>
</BODY></HTML>