CustomCheckBox.qml Example File
pushCollector/10.0/pushCollector/assets/CustomCheckBox.qml
import bb.cascades 1.0
Container {
property alias text: label.text
property alias checked: checkbox.checked
horizontalAlignment: HorizontalAlignment.Fill
leftPadding: 20
rightPadding: leftPadding
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}
Label {
id: label
horizontalAlignment: HorizontalAlignment.Left
layoutProperties: StackLayoutProperties {
spaceQuota: 1
}
onTouch: {
if (event.touchType == TouchType.Up) {
checkbox.setChecked(! checkbox.checked);
}
}
}
CheckBox {
id: checkbox
verticalAlignment: VerticalAlignment.Center
}
}