2 Replies Latest reply on Sep 22, 2010 11:13 PM by quoc_thai

    Two mxml component share same as combobox

    quoc_thai

      Hi all,

          

           I write custom Combobox component. At the first mxml component call Main.mxml , I have added it. Such as:

       

      ---- Main.mxml component---

       

      <mx:Canvas

      xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:component="component.*" >

      ...

      <mx:VBox>

       

       

           <component:AutoSuggest id="stock" dataProvider="{StaticDataCollection.stockArray}" autoCompleteSuggest="true"

                     styleName="

      myComboBox" width="65" tabEnabled="true" tabIndex="1" change="upperLetter(event)"/>

       

       

      </mx:VBox>

       

      <mx:VBox

      >

       

       

      <component:TradingDiary id="tradingDiary" catalogueDetailList="{catalogTotalLst}" selectIndex="{catalogIndex}"/>

       

       

      </mx:VBox>

      ...

       

           From above code, I also use TradingDiary component, and at this component, I also used combobox AutoSuggest component such as:

       

      ---- TradingDiary.mxml component---

       

      <mx:Canvas

      xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:component="component.*">

       

           ....

      <mx:VBox

      id="vbBelongStockName" width="155" paddingTop="5">

       

      <component:AutoSuggest id="stockCode" dataProvider="{StaticDataCollection.stockArray}" autoCompleteSuggest="true"

      styleName="

      myComboBox" width="65" change="upperLetter(event)"/>

       

      </mx:VBox>

       

           And now, when I operate to this combobox, both combobox at Main.mxml and  TradingDiary.mxml have same action ? How I solve my problem.

           And now, when I operate to this combobox, both combobox at Main.mxml and  TradingDiary.mxml have same action ? How I solve my problem.