Yes, this is a different “paradigm”.  You rarely work with the rendered components directly.  Instead, you manipulate the dataProvider.

 

To enable and disable elements in a TileList, you are going to need an itemRenderer.  That itemRenderer will set the enabled state of the rendered control according to a property (“imgenabled”) value in the dataProvider item that produced the rendered control.

 

On click of the check box, you will loop over the items in the dataProvider, and set the “imgenabled” property value as you need.  If you use the dataProvider API to update the dataProvider, the rendered controls in the TileList will automatically redraw and set their state according to the modified data.

 

There may be other ways, but this is a standard approach for data-driven Uis.

 

Tracy

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Phil Marston
Sent: Monday, August 28, 2006 12:17 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] addressing items rendered in TileList

 

Hi Tracy,

Thanks for the response - I couldn't work out if it was a badly worded question or just the way I'm doing it made no sense!

By subselections I mean I have a TileList with thumbnails representing items in a gallery (which is the dataProvider - the items are in an ArrayCollection).  Currently when a user clicks a thumbnail it displays in a separate viewer with additional associated data - all that's OK run of the mill stuff, but I'd like to disable some of the thumbnails (the subselection) according to certain attributes being selected (via a checkBox).

Intuitively when the user selects the checkBox I want to loop through the items in the TileList and change the attributes of the ones that fit the condition (e.g. whether they're enabled), but I can't find an easy way of addressing them.

I think I'm thinking about this from a Flash perspective and haven't quite got my head around using bindings and mixing between mxml objects and actionscript objects.  :-(

Any relevant pointers would be good - thanks,

Phil


Tracy Spratt wrote:

With all flex data driven controls, you will want to work with the dataProvider.

 

What exactly do you mean by “…address subselections…”?

 

Tracy

 


From: [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] On Behalf Of Phil Marston
Sent: Monday, August 28, 2006 8:46 AM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] addressing items rendered in TileList

 

Hi All,

Anyone know how I can address items rendered in a TileList?
I have a tileList
<mx:TileList id="tipList"
dataProvider="{gallery.tips}"
itemRenderer="gallery.Thumbnail"/>
which renders c.50 thumbnails and now I'd like to address subselections
of those thumbnails and can't figure it out.

ANY help appreciated

Cheers,

Phil

--
__________________________________________________________
Phil Marston
Technology Enhanced Learning
Centre for Learning & Teaching
University of Aberdeen
Aberdeen
AB24 3QY

Email: [EMAIL PROTECTED]ac.uk
Tel: +44(0)1224 273329
Mob: +44(0)7798 723660
Web: http://www.abdn.ac.uk/clt/
__________________________________________________________

The University of Aberdeen Open Day 29th August 2006
Booking is essential
www.abdn.ac.uk/openday
email [EMAIL PROTECTED]ac.uk
or call 0800 027 1495



-- 
______________________________________________________________ 
Phil Marston 
Technology Enhanced Learning
Centre for Learning & Teaching 
University of Aberdeen
Aberdeen
AB24 3QY
 
Email: [EMAIL PROTECTED]ac.uk
Tel: +44(0)1224 273329
Mob: +44(0)7798 723660 
Web: http://www.abdn.ac.uk/clt/
______________________________________________________________
 
The University of Aberdeen Open Day 29th August 2006
Booking is essential
www.abdn.ac.uk/openday
email [EMAIL PROTECTED]ac.uk
or call 0800 027 1495

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to