11-07-2012 01:52 AM
Dear all
Using cascade I can easily drag/drop the control into qml definition and can preview it visually. But it seem to draw the controls row by row. How to make the controls position absolutely in one line?
Solved! Go to Solution.
11-07-2012 04:19 AM
In this case you should use the AbsoluteLayout as the layout for this Container, but note that you have to specify the coordinates for each control. Check the example below to put two Buttons on the same line:
import bb.cascades 1.0
import bb.system 1.0
Page {
Container {
layout: AbsoluteLayout {}
Button {
id: btnConn
objectName: "btnConn"
text: "Connect"
preferredWidth: 330
layoutProperties: AbsoluteLayoutProperties {
positionX: 44
positionY: 260
}
}
Button {
id: btnDisc
objectName: "btnDisc"
text: "Disconnect"
preferredWidth: 330
layoutProperties: AbsoluteLayoutProperties {
positionX: 394
positionY: 260
}
}
}
}
I hope this helps.
11-07-2012 01:02 PM
Hi,
Just change Orientation of your Container.
Container {
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}
}
As Orientation is TopToBottom, you see them draw row-by-row.