11-18-2012 03:58 PM
I have a list.xml it only has 6 items and doesnt need to scroll up or down.
How do i disable scrollview . see below the code nothing eles on my page has scrollview
ListView {
id: listView
// set object name to let listView to be discoverable from C++
objectName: "listView"
layout: GridListLayout {
cellAspectRatio: 0.79
orientation: LayoutOrientation.BottomToTop
}
dataModel: XmlDataModel {
source: "models/items.xml"
}
listItemComponents: [
// define component which will represent list item GUI appearence
ListItemComponent {
type: "item"
// list item GUI appearence component is defined in external MyListItem.qml file
WebItem {
}
}
]
Thanks in advance.
Solved! Go to Solution.
11-20-2012 04:31 PM
11-20-2012 07:01 PM
there is some movement of my images that im calling from another qml page grid.
so the grid.qml put the images on my main page.
i have the title of my app and picture and then grid iamges that push to their specfic qml page.
those images that are coming from my grid.gml on to my main.qml are moving or scrolling up and down not by much but i dont want them to move at all.
11-20-2012 11:19 PM
11-20-2012 11:25 PM
new to programming seemed like the easiest way to have them appear and push to the next page.
so grid and list view have auto scroll that cant be disabled . see below for the code
import bb.cascades 1.0
Container {
layout: DockLayout {
}
Container {
id: mainContainer
layout: DockLayout {
}
horizontalAlignment: HorizontalAlignment.Center
topPadding: 15.0
bottomPadding: 15.0
leftPadding: 15.0
rightPadding: 15.0
ImageView {
id: myImage
imageSource: "asset:///images/button2.png"
preferredWidth: 700.0
preferredHeight: 950
}
}
// The Item content an image and a text with rotation.
Container {
// show image
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
bottomPadding: 80.0
ImageView {
imageSource: ListItemData.image
}
}
// and text below
Container {
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
preferredWidth: 170.0
bottomPadding: 5.0
topPadding: 200.0
Label {
text: ListItemData.title
textStyle.textAlign: TextAlign.Center
textStyle.color: Color.White
textStyle.fontSizeValue: 7.0
multiline: true
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
textStyle.lineHeight: 1.0
}
}
// Connect the onActivedChanged signal to the highlight function
ListItem.onActivationChanged: {
setHighlight(ListItem.active);
}
// Connect the onSelectedChanged signal to the highlight function
ListItem.onSelectionChanged: {
setHighlight(ListItem.selected);
}
}
12-05-2012 01:32 PM - edited 12-05-2012 01:39 PM
Hey peter9477,
I am having the same issue and do not want to reimplement a custom control that will layout items in a grid fashion. I have a ListView setup with GridListLayout. This made my job extreamly easy. To reimplement it would probably take several days, when all I need is to disable scrolling.
Setting touchPropagationMode: TouchPropagationMode.PassThrough helps. If I have items completely fill the bounds of the ListView, then the scrolling is disabled as it never receives the touch events. However if there are blank spots the ListView still receives the events and scrolls.
One solution would be to fill those blank spots with empty containers that intercept the touch events. I'll be opening a bug with RIM.
EDIT: I've opened a bug BBTEN-486