Flex: includeInLayout property

22 11 2008

Imagine a grid with a lot of columns. Only some 20 of them are visible and others are not. Each column represents a week with some data in its cells. To see ext 20 weeks there is a scroller (2 buttons: < and >). Scroller makes other 20 columns visible and others invisible. This very abstrctly and roughly describes one grid we have in our application. On top of horizontal scrolling thare are a lot of resources-consuming operations that works with data of this grid and with a grid itself. Not a wonder that we had a few nasty bugs which we were trying to fix for a long and tried really hard. Nothing helped untill…

in addition to visible = false we used includeInLayout = false.

More on this property is here: http://livedocs.adobe.com/flex/3/html/help.html?content=size_position_4.html

If you read it you’ll see that this is not something special, just a regular thing. But we somehow missed it and when found this out it helped us a lot :)


Actions

Information

5 responses

25 11 2008
Chris

Hey Sasha, don’t you thing your tags “WORK”, “FLEX” and “PROJECTS” are too big comparing to “weekends”, “friends”, “I like” and so on? ;)

29 11 2008
Pavel V.

I didn’t go to check out the link you provided but my gut feel is it should be similar to CSS visibility and display properties. Hide an element and it’s not visible to the user but it stays on the DOM model and keeps that visual space occupied. Suppress it from display and it’s gone completely, you can still script it but it’s not part of the rendered DOM model anymore.

correct ?

2 12 2008
Alexander Arendar

Your gut feels in proper way :)

2 12 2008
Alexander Arendar

Ok Chris, I will write the next post about how I mastered minimum of snowboard stuff :)

31 12 2008
mzx

Usually ppl that came from html world tend to use width = 0
wich is incorrect

Leave a comment