Я добавил Repeatbox на страницу. Я получаю данные json. Я установил useActiveItem как true. Когда я щелкнул данные, selectedItem скрывается. Итак, этикетка спряталась. Я хочу просто дать выбранный эффект строке. Как я могу это сделать. Мои коды следующим образом.
//Data Source
var myDataSource = [{
row : "First Row"
}, {
row : "Second Row"
}, {
row : "Third Row"
}
];
//label element to be included
var lbl = new SMF.UI.Label({
top : "0%",
left : "0%",
width : "100%",
height : "100%",
fillColor : "#FFFFFF",
textAlignment : SMF.UI.TextAlignment.center,
touchEnabled:false
});
//repeatbox list
var repeatBox1 = new SMF.UI.RepeatBox({
width : "100%",
height : "80%",
left : "0%",
top : "0%",
showScrollbar : true
});
repeatBox1.dataSource = myDataSource;
repeatBox1.onRowRender = function (e) {
this.controls[0].text = myDataSource[e.rowIndex].row;
};
repeatBox1.onSelectedItem = function (e) {
alert("Selected " + (e.rowIndex + 1) + ". row");
};
repeatBox1.onLongTouch = function (e) {
alert("first row is deleted...");
};
repeatBox1.itemTemplate.height = Device.screenHeight / 7;
repeatBox1.itemTemplate.imageFillType = SMF.UI.ImageFillType.stretch;
repeatBox1.itemTemplate.add(lbl);
repeatBox1.useActiveItem=true;
Pages.Page4.add(repeatBox1);
Страницы.Страница4.добавить(repeatBox1);