0 Replies Latest reply on Aug 20, 2007 11:46 AM by Pascal_Robert

    Changing the color of a hbox or canvas

    Pascal_Robert
      I want to add a region just before two text components, this region will show a different color based of the data coming out of a SOAP service like this :

      <mx:VBox y="46" width="780" height="500" backgroundColor="#000000" borderColor="#ffffff" x="10">
      <mx:Repeater id="rcal" dataProvider="{service.loadCalendar.lastResult}">
      <mx:VBox backgroundColor="#000000" borderColor="#ffffff" borderStyle="solid" cornerRadius="10" width="760">
      <mx:HBox backgroundColor="#454545" borderColor="#000000" width="760">
      <mx:HBox backgroundColor="{rcal.currentItem.couleur}" width="10%" height="20" />
      <mx:Text text="{rcal.currentItem.startDate} - {rcal.currentItem.endDate}" width="45%" height="20" fontFamily="Verdana" fontSize="12" color="#ffffff" textAlign="left"/>
      <mx:Text text="{rcal.currentItem.location}" width="45%" height="20" fontFamily="Verdana" fontSize="12" color="#ffffff" textAlign="right"/>
      </mx:HBox>
      </mx:VBox>
      </mx:Repeater>
      </mx:VBox>

      The problem is this line :

      <mx:HBox backgroundColor="{rcal.currentItem.couleur}" width="10%" height="20" />

      Event if "rcal.currentItem.couleur" has a correct value (#ffffff), the background has the same color as the VBox. I also tried with a mx:Canvas, same problem.