Bonjour,
Je souhaite afficher dans une tilelist le nom et l'aperçu des objets contenus dans un tableau.
Voici ce que j'ai fait (en gros)
MonComposant.mxml
Ceci marche très bien quand la propriété thumbnailURL de mon Objet contient une URL valide. Dans ce cas, j'ai l'"image" suivante d'affichée :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ import ... [Bindable] private var _tab:ArrayCollection; public function get tab():ArrayCollection { return _tab; } public function set tab(tab:ArrayCollection):void { _tab = tab; } ]]> </mx:Script> <mx:TileList dataProvider="{_tab}" width="100%" height="100%" click="foo()"> <mx:itemRenderer> <mx:Component> <mx:VBox width="200" height="200" horizontalAlign="center" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"> <mx:Image source="{data.thumbnailURL}" width="150" height="150"/> <mx:Text text="{data.name}" width="175"/> </mx:VBox> </mx:Component> </mx:itemRenderer> </mx:TileList> </mx:VBox>
J'aurai voulu savoir comment la remplacer pour mettre à la place une image de mon choix.
Au final avoir une image qui s'affiche par défaut.
Merci.
Partager