1 Reply Latest reply on Jul 14, 2006 5:28 AM by Kishan M V

    Image again in Button bar dataProvider

    TIPLVinay Level 1
      I apologize for the duplicate Topic...


      here is <mx:Script>

      [Embed(source='images/create.jpg')]
      public var createIcon:Class;

      ButtonBar Code:-

      <mx:ButtonBar iconField="@Icon" borderStyle="solid" buttonWidth="25" horizontalGap="2" verticalGap="0"">
      <mx:dataProvider>
      <mx:Array>
      <mx:Object id="image1" Icon="createIcon"/>
      <mx:Array>
      </mx:dataProvider>
      </mx:ButtonBar>

      Not shows the Image in button and the same is working fine when using image for Menubar

      The below code works fine :-

      <mx:ButtonBar borderStyle="solid" buttonWidth="25" horizontalGap="2" verticalGap="0"">
      <mx:dataProvider>
      <mx:Array>
      <mx:Object id="image1" icon="@Embed(source='images/create.jpg')"/>
      <mx:Array>
      </mx:dataProvider>
      </mx:ButtonBar>

      whts wrong in above code ...??
        • 1. Re: Image again in Button bar dataProvider
          Kishan M V Adobe Employee
          Use <mx:ButtonBar iconField="Icon" borderStyle="solid" buttonWidth="25" horizontalGap="2" verticalGap="0"">



          <?xml version="1.0" encoding="utf-8" ?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
          <mx:Script>
          <![CDATA[


          [Bindable]
          [Embed(source='assets/ballon.jpg')]
          public var createIcon:Class;

          ]]>
          </mx:Script>
          <mx:ButtonBar iconField="Icon" borderStyle="solid" buttonWidth="25" horizontalGap="2" verticalGap="0">
          <mx:dataProvider>
          <mx:Array>
          <mx:Object id="image1" Icon="{createIcon}"/>
          </mx:Array>
          </mx:dataProvider>
          </mx:ButtonBar>
          </mx:Application>

          Thanks