The List should have the following DisplayObject tree

List
 |----border
 |----listContent
              |--- selectionLayer
              |--- renderer0
              |--- renderer1

A mask is applied to listContent so none of its children can draw outside the 
list.  Some other child of list (or some floating thing between lists) can draw 
outside the list, and drawSelectionIndicator() would be a good place to control 
that drawing.
                -

From: [email protected] [mailto:[email protected]] On Behalf 
Of justin.voshell
Sent: Wednesday, January 21, 2009 4:40 PM
To: [email protected]
Subject: [flexcoders] Drawing outside a list with an ItemRenderer


Hello,

I have been tasked with constructing an interface in Flex which features two
lists, side by side. The content of the list on the right is driven by the
selection of an item from the list on the left.

To highlight this dependency visually, the list on the right has been given a
3px border with a color that matches the selection color of the list on the
left.

The tricky part is this: I need to create the visual impression that the
colored selection box around the selected item in the left list extends
outside the list and joins the colored border on the right list.

I have a custom item renderer on which I've set clipContent='false'. This
lets me draw outside the bounds of the item renderer, but *not* outside of the
bounds of the list. Because a list is not a Container, there is no
corresponding clipContent property on List.

Any thoughts?

Thanks in advance,
Justin Voshell

Reply via email to