<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Combobox Events in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689812#M15443</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe on the next extentChange event you could reset the selectedIndex of the ComboBox since it's no longer "valid".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Dec 2010 21:25:15 GMT</pubDate>
    <dc:creator>DasaPaddock</dc:creator>
    <dc:date>2010-12-09T21:25:15Z</dc:date>
    <item>
      <title>Combobox Events</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689811#M15442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good afternoon all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am attempting to use a combo box to select and zoom to an area.&amp;nbsp; This works great until the user pans around and decides that they want to select and zoom to the area they already have selected.&amp;nbsp; The problem lies in that when the user selects the same item, only the close event fires.&amp;nbsp; The close event also fires when the user hits esc key, clicks the combo box button, or clicks anywhere else on the page.&amp;nbsp; The biggest problem I see is that it appears that the close event cannot determine if you clicked an item in the list to close or just hit esc or whatever.&amp;nbsp; Does anyone have any ideas of how to handle this sort of navigation?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 20:15:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689811#M15442</guid>
      <dc:creator>CaseyBentz</dc:creator>
      <dc:date>2010-12-09T20:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combobox Events</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689812#M15443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe on the next extentChange event you could reset the selectedIndex of the ComboBox since it's no longer "valid".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 21:25:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689812#M15443</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-12-09T21:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Combobox Events</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689813#M15444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Casey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I think what you are talking about is how to have some event fired even if it is the same item selected in the combobox. If that is the case then here is a solution that has some draw backs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;s:ComboBox id="cb1" open="cb1.selectedIndex = -1" change="trace(cb1.selectedItem)"&amp;gt;
&amp;nbsp; &amp;lt;s:ArrayList&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;Red&amp;lt;/fx:String&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;Green&amp;lt;/fx:String&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;Blue&amp;lt;/fx:String&amp;gt;
&amp;nbsp; &amp;lt;/s:ArrayList&amp;gt;
 &amp;lt;/s:ComboBox&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The good part is the changed event will be fired even if the user selects the same item.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The bad part is if the use hits esc key then there is no longer a active selection in the CB&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:01:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689813#M15444</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T05:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Combobox Events</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689814#M15445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert, I tried this method yesterday as well.&amp;nbsp; I need the selectedItem to remain even if the user hits esc.&amp;nbsp; I have been racking my brain and have come up with 2 possible solutions.&amp;nbsp; One would be to somehow extend the standard combobox by adding an itemClick event.&amp;nbsp; I have never done something like this and am not sure if it is even possible.&amp;nbsp; My other idea is to use a popup menu and add a list&amp;nbsp; and use it in place of the combobox.&amp;nbsp; Any thoughts on these 2 ideas?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am also attempting to figure out how to update the field aliases in my MXD.&amp;nbsp; The MXD I have is old and was built prior to a standardization of the field aliases.&amp;nbsp; I am thinking there must be a way to do this using arcpy.&amp;nbsp; Like list all the fields in each layer in the map.&amp;nbsp; Then list all the feature classes in a data set and search for the feature class and then for the field name from a list of all the fields from that feature class and then read the alias and use that to set the alias of the layer in the map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 13:49:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689814#M15445</guid>
      <dc:creator>CaseyBentz</dc:creator>
      <dc:date>2010-12-10T13:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Combobox Events</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689815#M15446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Casey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Here is another route&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private var cbSelectedIndx:Number = -1;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function cbOpen():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; cbSelectedIndx = cb1.selectedIndex;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cb1.selectedIndex = -1;
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function cbClosed():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(cb1.selectedIndex == -1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cb1.selectedIndex = cbSelectedIndx;
&amp;nbsp;&amp;nbsp; }
&amp;lt;s:ComboBox id="cb1" open="cbOpen()" change="trace(cb1.selectedItem)" close="cbClosed()"&amp;gt;
&amp;nbsp; &amp;lt;s:ArrayList&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;Red&amp;lt;/fx:String&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;Green&amp;lt;/fx:String&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;fx:String&amp;gt;Blue&amp;lt;/fx:String&amp;gt;
&amp;nbsp; &amp;lt;/s:ArrayList&amp;gt;
 &amp;lt;/s:ComboBox&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:01:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689815#M15446</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T05:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Combobox Events</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689816#M15447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perfect. Thanks as always. In this new forum I have no idea how or even if I can mark this as answered. But thanks for answering this post. I was ready to give up hope.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 15:41:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/combobox-events/m-p/689816#M15447</guid>
      <dc:creator>CaseyBentz</dc:creator>
      <dc:date>2010-12-10T15:41:27Z</dc:date>
    </item>
  </channel>
</rss>

