xui.UI.FoldingList

Find code here before you post.

xui.UI.FoldingList

Postby linb » Sat Apr 27, 2013 3:28 am

   
Class('App.xui_UI_FoldingList', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=[], append=function(child){children.push(child.get(0))};

append((new xui.UI.FoldingList)
.setHost(host,"FoldingList1")
.setItems([{"id":"a", "caption":"itema", "title":"item a", "text":"text1"}, {"id":"b", "caption":"itemb", "title":"item b", "text":"text2"}, {"id":"c", "caption":"itemc", "title":"item c", "text":"text3"}])
.setLeft(50)
.setTop(40)
.setWidth(280)
.setHeight(110)
.setCmds([])
);

append((new xui.UI.FoldingList)
.setHost(host,"foldinglist2")
.setItems([{"id":"a", "caption":"itema", "title":"item a", "text":"text1",optBtn:true}, {"id":"b", "caption":"itemb", "title":"item b", "text":"text2"}, {"id":"c", "caption":"itemc", "title":"item c", "text":"text3"}])
.setLeft(390)
.setTop(40)
.setWidth(280)
.setHeight(110)
.setCmds([{"id":"reply", "caption":"reply"}, {"id":"remove", "caption":"remove"}])
.setActiveLast(true)
.onClickButton("_foldinglist2_oncommand")
.onShowOptions("_foldinglist2_onshowoptions")
);

return children;
// ]]code created by CrossUI RAD Tools
},
_foldinglist2_onshowoptions:function (profile, item, e, src) {
xui.message('options');
},
_foldinglist2_oncommand:function (profile, item, cmdkey, src) {
xui.message(cmdkey+":"+item.id+" clicked!")
}
}
});
   
linb
Site Admin
 
Posts: 102
Joined: Thu Apr 25, 2013 6:51 am

Return to CrossUI Code Snaps

Who is online

Users browsing this forum: No registered users and 2 guests

cron