Adobe Dreamweaver Forums



Last 10 THreads :         Re: Photoshop won't launch (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 0 - Views : 1 )           »          Eventlistener for exiting frame (Last Post : Andrei1 - Replies : 1 - Views : 2 )           »          CS4 Motion Editor issues (Last Post : jdehaan - Replies : 3 - Views : 9 )           »          Flash file won't display (Last Post : Murray *ACE* - Replies : 18 - Views : 19 )           »          How do I centre Tables ? (Last Post : Murray *ACE* - Replies : 3 - Views : 4 )           »          3 overlapping background images on same page (Last Post : Murray *ACE* - Replies : 9 - Views : 10 )           »          Can I make a 4 state CSS Sprite nav bar. (Last Post : Murray *ACE* - Replies : 7 - Views : 8 )           »          Re: Photoshop CS3 Keeps on Crashing at Random - Help! (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 0 - Views : 1 )           »          bad luck (Last Post : Andrei1 - Replies : 1 - Views : 2 )           »          ActivMail (cf_mail) and Bare LF problem (Last Post : Fetch - Replies : 1 - Views : 2 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-04-2008, 09:00 AM
nijlz
 
Posts: n/a
Diggs:
Default Embedded Images in a DataGrid

Hello everybody,

I have a DataGrid like this and a Custom Component Icon (based on Image). I
have iconTypes like Folder, Document and so on and I have to match them to the
Embeded ImageFiles.
I cannot see any solution. Maybe you see a completely different way to do
this. It seems to be easy, but I don't know how to do this with embededded
Images.

Thank you.

<mxataGrid>
<mx:columns>
<mxataGridColumn width="21">
<mx:itemRenderer>
<mx:Component>
<com:Icon iconType="{data.iconType}" />
</mx:Component>
</mx:itemRenderer>
</mxataGridColumn>
<mxataGridColumn headerText="Name" dataField="name"/>
</mx:columns>
</mxataGrid>

<mx:Image xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
[Bindable]
public var iconType:String;

[Embed(source="img/cl_core.Folder.png")]
public static const FolderIcon:Class;

]]>
</mx:Script>
</mx:Image>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-04-2008, 09:00 AM
atta707
 
Posts: n/a
Diggs:
Default Re: Embedded Images in a DataGrid

override the set data function of your Icon component and you'll get the
current row passed in as a parameter. Now use the data data in the current row
to decide which icon you want to show, set the source of your Image to this
icon.

ATTA

Reply With Quote
  #3 (permalink)  
Old 11-04-2008, 09:00 AM
nijlz
 
Posts: n/a
Diggs:
Default Re: Embedded Images in a DataGrid

Thank you.
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 01:25 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk