01-17-2013 05:31 AM
Hello,
I want to use the GridListLayout layout to display Labels in my ListView.
But I can't center them verticaly. They are only centered horizontaly !!!
Here's my code :
Page {
Container {
ListView {
layout: GridListLayout {
orientation:LeftToRight
columnCount:6
}
id:lettersList
dataModel: lettersModel
attachedObjects: [
LettersModel {
id: lettersModel
jsonAssetPath: "app/native/assets/letters.json"
filter:"A"
}
]
listItemComponents: [
ListItemComponent {
Container{
layout: DockLayout {
}
verticalAlignment: verticalAlignment.Fill
horizontalAlignment: HorizontalAlignment.Fill
rightPadding: 2
topPadding: 2
bottomPadding: 2
leftPadding: 2
background: Color.LightGray
Label {
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: verticalAlignment.Center
text: ListItemData.title
}
}
}
]
}
}
}
Could you help ?
Thanks a lot,
Laurent