Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
MindOperations
Posts: 64
Registered: ‎03-04-2010
My Device: 9930

List SIze

[ Edited ]

When I load a list I want the size preferredHeight: to reflect the list items that are loaded from a XML file.  I can't see any options that exist to make this simple like peferredHeight: ListItemData. 

 

Any suggestions so I dont need to make sizing complicated?

Brandon Clark
The Mind Company | www.themindspot.com

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: List SIze

That should work, but possibly not with a StandardListItem. Got any code to show?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Regular Contributor
MindOperations
Posts: 64
Registered: ‎03-04-2010
My Device: 9930

Re: List SIze

Okay let me look into that suggestion.  Here is my file: https://github.com/TheMindCompany/MindDriveSystem/blob/master/MindDrive/assets/ExpandableItem.qml

Brandon Clark
The Mind Company | www.themindspot.com

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: List SIze

The only place you used preferredHeight there was on the list itself. Is it that to which you were referring? I thought you meant on the list items, not on the list.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Regular Contributor
MindOperations
Posts: 64
Registered: ‎03-04-2010
My Device: 9930

Re: List SIze

[ Edited ]

Not working.  I have a customized list going, feel like I tried all the related calls for size.  I also tried sizing each item in the list but still get the same problem I am trying to avoid.



The problem I am running from is if you look at my code I have the preference page made of a collapsible list tree.  Within each (in pref.qml) ExpandibleHeader: when visible it make the following ExpandibleHeader: not show because the list size is seemingly infinite. I can pass a size to make it fit but I want it to fit more dynamically to the items that exist in it.

 

Update @peter9477:  When I try to adjust the list items size I get the same problem I mentioned above above.

Brandon Clark
The Mind Company | www.themindspot.com

Regular Contributor
MindOperations
Posts: 64
Registered: ‎03-04-2010
My Device: 9930

Re: List SIze

[ Edited ]

I am going to go back and I am going to try and have the individual sections size it again.  Maybe I did something the first time I tried.  I feel preferredHeight: ListItem.sectionSize should work.

Brandon Clark
The Mind Company | www.themindspot.com

Regular Contributor
MindOperations
Posts: 64
Registered: ‎03-04-2010
My Device: 9930

Re: List SIze

That didn't work again either.  I know what I have to do, and it is probly the better road to create one master xml file but that means I cant have everything broken down like I wanted.

Brandon Clark
The Mind Company | www.themindspot.com