3 Replies Latest reply on Sep 25, 2009 10:20 AM by Flex harUI

    Flex list iteamRenderer - making elements of iteamRenderer visible on mouseOver

    asweers

      I have a list containing an IteamRenderer.  I want a button inside of the iteamRenderer to become visible when that element in the list is selected or being hovered over(mouseOver).  At the moment I'm able to accomplish changing the buttons visibility by using mouseOver and mouseOut on the Canvas of the custom component.

       

           <mx:List
                   width="100%" height="100%"
                   dataProvider="{ArrayCollection}" 
                   itemRenderer="List"

       

            </mx:List>

       

       

      List.mxml

      <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" mouseOver="showButtons()" mouseOut="hideButtons()">
          <mx:Script>
          <![CDATA[ 
              public function hideButtons():void{
                  submitButton.visible = false;
              }
              public function showButtons():void{
                  submitButton.visible = true;
              }
          ]]>
          </mx:Script>

       

           <mx:Button id="submitButton"  label="submit" visible="false"/>

         
      </mx:Canvas>

       

       

      Any help would be much appreciated

      Tanks!