calculate the height of parent element - apache-flex

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.

Related

HBox children on top without changing layout order

I have created a Hbox with several Buttons inside as children. I want to increase one button size and be on top of others. Not as appreciated in the figure... I Have tried with children_button.toFront() but it changes the layout order.
Any help would be appreciated.
i am not sure if this works in an Hbox as I think toFront puts the Child on the first position of the ChildList in the parent Node. But this would mean that HBox would layout it on the very left on first place. So maybe they are overriding the default behavior in this Case? Just my guess

QTreeWidget that contains widgets and set row height issue

Setting row height is more or less trivial via inherit from QItemDelegate.
The problem is that I can make the row size bigger but I cannot make it smaller if I add a widget inside.
Any tip on this?
Thank you in advance.
Maybe your widget QWidget::minimumSize().height() is bigger than you want to set in your row height?
Also, maybe you will post some related code?

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.

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 :)

Auto-sizing the height of a TileList

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.

Resources