So you didn't take my advice and are still working with Container? :-)
 
I think you can subclass or clone ListitemRenderer and toggle visibility
and layout of things based on some field in the data object.
 
I don't know your time frame, but if you can use Moxie, the next beta
should allow you to create an entirely different renderer based on data.
 
-Alex

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt
Sent: Sunday, August 26, 2007 7:36 PM
To: [email protected]
Subject: [flexcomponents] Need itemRenderer with 2 "states", 3 controls,
variable height, wrapping Text box



I've tried this so many ways, it is time to ask for help.

The list needs two kinds of rows, a 'category header" and an item.  The
header has only a text box, the item has an item number, text box and a
radiogroup.

My big problem is the text box.  It needs to resize when the
Browser/App/parent is resized, and the text needs to wrap, increasing
the height of the control and the height of the list line (and the
overall height of the list, of course).

I first tried using a ViewStack to toggle between the header an item
formats, I have tried manipulating the control visibility and
positioning, and I have tried dynamically adding the child controls.  I
have read through the ListItemRenderer.as code because it handles
wrap/resize just fine, thinking to modify it, but it is not oriented
towards item data-driven state changes.  I can get tantalizingly close
using all the above methods.  I am not very comfortable with mx:States
so I< /FONT> haven't tried that.  The good news is I have learned a lot.
I like Alex H's advice to extend UI component, but if I can't even get
this to work with a container, I am not ready for that yet.

Will someone please point me in some productive direction?  Any hints,
advice, examples, anything will be appreciated. 

Thanks, 

Tracy


 

Reply via email to