Auto-sizing the height of a TileList - apache-flex

Is there a way to have the TileList component to auto-size to its contents? I have tried setting it 100%, but it seems that won't help. I don't want to hard-code the height because the content will be vary, and I don't want scrollbars to show up. Please help.

This is how I ended up solving this issue:
First I set the values for rowHeight and maxColumn properties. Then I did a little function that fires on the updateComplete event of the TileList to calculate the height of the tileList by doing a rowHeight * number of rows.
That worked.

Try creating an event handler when the tilelist changes, calculate the height based on the children then resize the child list based on that value.

Related

Flex AdvancedDataGrid slow on performance while being resized

I have a AdvancedDataGrid which is placed inside a resizable container (custom panel) and fixed at 100% width and height. Datagrid has about 100 rows and 15 columns. When I try to resize the container datagrid kinda freezes. I understand that while resizing the whole redraw process is being held in my datagrid but are there any ways of optimizing this behavior? Can I force datagrid postpone the whole update process while I am resizing the outter container?
you should rewrite AdvancedDataGrid class function invalidateDisaplyList to your own, but you should to go deeper until UIComponent to handle it in right way, so you could have another way: just while resizing clean dataProvider of Grid and after event will be completed set dataProvider back.

Flex List auto height

Is it possible for a Flex List to adjust its height automatically for the number of rows it's displaying? The problem I'm having is that the List renders taller than the number rows. The number of rows is dynamic so I'd like the List to automatically adjust its height based on its content. I've tried setting height="100%" which doesn't help.
It appears that List defaults to fixed row height. Setting variableRowHeight to true fixed it.
variableRowHeight="true"
If your items all render at the same height, you could bind the height of your list to the number of rows * the item renderer height.
Alternatively, if you are using Flex 4, you can create new skin for your List based on the existing List skin, but remove the Scroller that wraps the DataGroup and make the height of the DataGroup 100%.
Hope that helps.

Flex - How To Modify The Verticle Gap In A Repeater

I Have a VBox, and set the verticleGap = 0. Inside the VBox I have a Repeater. When I run the App, the items listed from the Repeater have a large gap between each line. Is there a way to set the verticleGap on the Repeater, or reduce that space?
Thanks
Two things: First, the property is misspelled, it should be "verticalGap" for your VBox. Second, if your repeated components are all the same height, you could set an explicit height for your Repeater component, such as height="22". Hope that helps.

calculate the height of parent element

I have three datagrids inside VBox container. Since I don't want scrollbar in my flex widget i am increasing the height of SWF
through javascript, which increases with each addition of row in my datagrid. My query is how can I get the exact height of
my VBox which is the parent element of datagrid. I am not able to get the height of VBox. I have tried to use measuredHeight,height with no success.
Could anybody please suggest me the way out for the same.
Thanks in advance!!!
vbox.height should give you theheight of the DataGrid.

Always resize the viewStack

I'm facing one weird problem : I'm using a viewStack which have is property resizeToContent set to true. When I'm selecting a child higher than the viewStack, it's correctly resized, but when I'm selecting another child which is smaller, the viewStack isn't resized !!!
What I want is that my viewStack get the height of the selectedChild each time.
though, the Adobe doc say :
If true, the ViewStack container automatically resizes to the size of its current child.
Have any idea ???
thanks a lot
So...,
as I haven't found any solution, I take a work around : I'm setting a default value for the height of my viewStack each time I'm changing the view seleted....
It's not very clean, but it's work
but if someone found a better soluce, I'll be happy :)

Resources