override close (onBlur?) event on dijit.form.DropDownButton holding measurement wdgt

776
4
10-25-2011 11:32 AM
martinschmoll
New Contributor III
I have a layout with a dijit.Toolbar at the top.  It contains a few buttons including a dijit.form.DropDownButton within which I have a dijit.layout.ContentPane within which I have the <div id="measurementDiv"></div>.

The look and behavior are exactly what I want except for how the dijit.form.DropDownButton closes when using any of the measurement widget tools by clicking on the map.  I'd like to have the dijit.form.DropDownButton stay open to display the results until the button is clicked again.

How do I override the event that is closing the dijit.form.DropDownButton when the map is being clicked?
0 Kudos
4 Replies
EdSaunders
Occasional Contributor
Hey Martin, did you solve this or go with another dijit?  I'd like to do the same thing.

Cheers,
Ed
0 Kudos
JianHuang
Occasional Contributor III
Martin, Ed,

I'm assuming you want the similar look and feel as arcgis.com uses the measurement tools. I suggest to use toggle button to show and hide the div which holds the measurement widget instead of a dropdown button.
Hope this helps.
0 Kudos
martinschmoll
New Contributor III
Martin, Ed,

I'm assuming you want the similar look and feel as arcgis.com uses the measurement tools. I suggest to use toggle button to show and hide the div which holds the measurement widget instead of a dropdown button.
Hope this helps.


Yes exactly, I saw how arcgis.com does it.  This is a side project for me so I haven't finished yet. 

Which type of dijit would you show/hide using the toggle button?  The nice thing with the dropdown button is that you can place a contentpane inside of it.

I was also considering lifting the Basic Viewer sample that uses the dojox.layout.FloatingPane widget.   Having the measurement tool in the floater feels too much like ArcMap though 😄
0 Kudos
JianHuang
Occasional Contributor III
It depends on your purpose. Normally, I would just put a div there to hold the measurement widget, and the toggle button can show/hide the div.
0 Kudos