How do you disable a Flex 4 Spark List's auto-resize?
I'm developing a Calendar application, and I'm usin开发者_开发知识库g a Spark List inside a Panel for each individual day, in a 5x7 grid. I'd like to make sure that the individual lists stay the same size and simply add scrollbars when needed, but I'd also like to avoid setting an explicit width or height to maintain compatibility with multiple screen resolutions. Any ideas?
Are you building this from scratch? Or using a Calendar Component? We love our Flex Calendar, of course.
The way we handle the issue is that the Calendar component sizes and positions the days. The Calendar can be sized dynamically; but the days are not. They are sized in the updateDisplayList() of the Calendar, based on the unscaledWidth/unscaledHeight. If you want to stay 100% spark, you'd do this sizing in the updateDisplayList() of the Calendar's Skin.
The Day components, once again, use updateDisplayList() method to size and position the children. So, we size things explicitly based on a dynamic container's size.
精彩评论