← Back to team overview

ubuntu-phone team mailing list archive

Re: Setting expandedHeight on Expandable

 

Hello, Sam!

What about
expandedHeight: innerColumn.height
where "innerColumn" is id of Column in your example?

BTW, I have no idea when setting
height: childrenRect.height
for column can be helpful...

BR,
Roman.


2014-07-19 21:22 GMT+04:00 Sam Bull <sam.hacking@xxxxxxxx>:

> I'm having difficulty setting the expandedHeight correctly on an
> Expandable.
>
> For Columns I have been able to set the height to childrenRect.height,
> but using this on the Expandable doesn't seem to work.
>
> Is there a way to automatically set the expandedHeight to it's child,
> without using an id attribute?
>
> So, what I'm trying, is:
>         ListItem.Expandable {
>             onClicked: expanded = true
>             collapsedHeight: units.gu(6)
>             expandedHeight: childrenRect.height
>
>             Column {
>                 anchors { left: parent.left; right: parent.right }
>                 height: childrenRect.height
>         ...
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References