Wednesday, July 22, 2009

Flex slidding panels showing off screen

So in the current project I'm working on I have a lot of Panels that slide on and off the screen. The problem I keep having is the Panels are still visible when their x value is set to the width of the container (meaning they are outside of the container but you can still see the edge of the Panel). I was messing around with clip content, etc, and nothing seemed to be working. Eventually I did the following combination and it worked (but still doesn't make much sense to me).

Set the container holding the sliding Panel to includeInLayout = false
Set the sliding panel to clipContent = true (and includeInLayout = true - the default)

Weird, but it works.

1 comment:

Ed Syrett said...

Here's my attempt at a sliding panel:

http://edsyrett.wordpress.com/2009/11/27/focus-loops-within-focus-loops/

Mine is a reusable component that can slide in from the right or left, and in this post you can find out how to implement a focus loop in the panel.