0
在這裏,我面臨一個問題,我需要更改下拉選項以對齊右側。下拉對齊在BB 10級聯
現在我推的價值像...
foreach (int key, map.keys()){
if(position ==1 && key >1000) {
Option* option = Option::create();
option->setText(map[key]);
option->setValue(key);
dropDown1->add(option);
//dropDown1->setHorizontalAlignment(HorizontalAlignment::Right);
}else
if(position ==2 && key < 1000) {
Option* option = Option::create();
option->setText(map[key]);
option->setValue(key);
dropDown1->add(option);
}
}
和我的QML就像
Container {
objectName: "DdContainer"
layout: StackLayout {
orientation: propertyMap.textSize.length == 6 ? LayoutOrientation.RightToLeft : LayoutOrientation.LeftToRight
}
topPadding: 20.0
horizontalAlignment: HorizontalAlignment.Fill
DropDown {
// title: "Select Symbol"
objectName: "myDropDown"
enabled: true
layoutProperties: StackLayoutProperties {
spaceQuota: 3.0
}
}
Button {
imageSource: "asset:///images/add_button.png"
maxHeight: 100
maxWidth: 100
layoutProperties: StackLayoutProperties {
spaceQuota: 1.0
}
onClicked: {
_addOrDelRef.showSymbolsListView();
// _addOrDelRef.dropSymbols(1);
}
}
}
如果key低於1000靠左對齊,否則以right.How做,在BB 10個級聯...
請幫幫忙, 謝謝...
此值,請添加更多的QML知道包含您的下拉 – Benoit
你好Hithredin的容器結構,我已經編輯了問題,請現在發現它。 .. – Sharath