Use inline item renderer to display image : Image « Graphics « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Graphics » ImageScreenshots 
Use inline item renderer to display image
Use inline item renderer to display image
        
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
    
        import mx.collections.ArrayCollection;
        public var localVar:String="localVar";

        [Bindable]
        private var myData:ArrayCollection = new ArrayCollection([
            {CD:'A', CDName:'aa',Price:1.9, Cover:'a.jpg'},
            {CD:'B', CDName:'bb',Price:1.9, Cover:'b.jpg'}
        ]);
  
    </mx:Script>
    <mx:DataGrid id="myGrid" dataProvider="{myData}" variableRowHeight="true">
        <mx:columns>
            <mx:DataGridColumn dataField="CD"/>
            <mx:DataGridColumn dataField="CDName">
                <mx:itemRenderer>
                    <mx:Component>
                        <mx:VBox>
                            <mx:Text id="albumName" width="100%" text="{data.CDName}"/>
                            <mx:Image id="albumImage" height="45" source="{data.Cover}"/>
                        </mx:VBox>
                    </mx:Component>
                </mx:itemRenderer>
            </mx:DataGridColumn>
            <mx:DataGridColumn dataField="Price"/>
        </mx:columns>
    </mx:DataGrid>
</mx:Application>

   
    
    
    
    
    
    
    
  
Related examples in the same category
1.Bind Image to a variableBind Image to a variable
2.Explicit sizing for the Image control and default sizing for the Button controlExplicit sizing for the Image control and default sizing for the Button control
3.uses explicit sizing for the Image control and default sizing for the Button controluses explicit sizing for the Image control and default sizing for the Button control
4.Change Image source in button actionChange Image source in button action
5.Image as Button skinImage as Button skin
6.When the user clicks the button, the action sets the visible property of the image to true to make it appear
7.Use load() method to replace a small image with a large image when the user clicks a buttonUse load() method to replace a small image with a large image when the user clicks a button
8.Using GIF file as both a skin for the Button control and a source for the tag
9.Embedding three images and applies those images as skins to an instance of a Button controlEmbedding three images and applies those images as skins to an instance of a Button control
10.Button with Embedded imageButton with Embedded image
11.Maintain Image Aspect RatioMaintain Image Aspect Ratio
12.Add image based border skin for CanvasAdd image based border skin for Canvas
13.Load image from a URLLoad image from a URL
14.Working with different media typesWorking with different media types
15.Setting visibilitySetting visibility
16.Import a green square from a SWF file that contains a library of different shapes
17.Resize logo to the exact values of the height and width properties without regard for its aspect ratioResize logo to the exact values of the height and width properties without regard for its aspect ratio
18.Assigning an image to a variable to decouple its locationAssigning an image to a variable to decouple its location
19.Use Image control to display imageUse Image control to display image
20.Use a relative path to reference an image in an assets directoryUse a relative path to reference an image in an assets directory
21.Reference an image using a URLReference an image using a URL
22.Create image thumbnailsCreate image thumbnails
23.Set height and width of the image to 150 by 200 pixelsSet height and width of the image to 150 by 200 pixels
24.Resize Image to exact height and widthResize Image to exact height and width
25.x and y properties specify the upper-left corner of imagex and y properties specify the upper-left corner of image
26.Use ActionScript to set image propertiesUse ActionScript to set image properties
27.Use load() method to replace imageUse load() method to replace image
28.Text can flow around the imageText can flow around the image
29.Layout images in a CanvasLayout images in a Canvas
30.Png image based skinPng image based skin
31.Use Image control in an MXML fileUse Image control in an MXML file
32.skin based on png imagesskin based on png images
33.Do not maintain Aspect Ratio when displaying image with ImageDo not maintain Aspect Ratio when displaying image with Image
34.Use source for Image controls and other controls that point to an external fileUse source for Image controls and other controls that point to an external file
35.Compare Two Bitmap ImagesCompare Two Bitmap Images
36.Image source fileImage source file
37.Load image file for an Image control with load methodLoad image file for an Image control with load method
38.Image control io error
39.Image BindingImage Binding
40.Image DemoImage Demo
41.Set Image Source to change image file for an Image controlSet Image Source to change image file for an Image control
42.Load Image With Load method from a disk fileLoad Image With Load method from a disk file
43.Move ImageMove Image
44.Load image with Loader and Paint image with graphics
45.Display Images and SWFs in HTMLDisplay Images and SWFs in HTML
46.Load and Display an ImageLoad and Display an Image
47.Display a Custom Loader while Loading ImagesDisplay a Custom Loader while Loading Images
48.skin with imageskin with image
49.Use the backgroundImage style to specify an image as the background of the containerUse the backgroundImage style to specify an image as the background of the container
50.Access a JPEG image at run timeAccess a JPEG image at run time
51.Reference an image by using a URLReference an image by using a URL
52.By specifying a height and width of 20 by 20 pixels, you create a thumbnail of the image.By specifying a height and width of 20 by 20 pixels, you create a thumbnail of the image.
53.Load a simple image from a local locationLoad a simple image from a local location
54.Using the tag and how text can flow around the imageUsing the <img> tag and how text can flow around the image
55.Use @Resource directive anywhere a String might supply the location of the image.
56.Set image transform center to the right edge, corresponding to the transormX property having a value of 100Set image transform center to the right edge, corresponding to the transormX property having a value of 100
57.Image ClassImage Class
58.Read and Save a User's Webcam ImageRead and Save a User's Webcam Image
59.Embed a JPEG image into a Flex applicationEmbed a JPEG image into a Flex application
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.