I'm trying to show a context menu when right clicking on a listgrid. The following is testcode. What am I missing? It doesn't seem to be displaying.
Code:
isc.Menu.create({
ID:"mainMenu",
width:150,
data:[
{title:"Visible", checkIf:"widget.isVisible()",
click:"widget.isVisible() ? widget.animateHide('fade') : widget.animateShow('fade')"
},
{isSeparator:true},
{title:"Size", enableIf:"widget.isVisible()"},
{title:"Move", enableIf:"widget.isVisible()"},
{isSeparator:true},
{title:"Reset",
click:"widget.animateRect(200,75,100,100);widget.animateShow('fade')",
icon:"other/yinyang.gif",
iconWidth:20,
iconHeight:20
}
]
});
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true,
data: countryData,
fields:[
{name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"},
{name:"continent", title:"Continent"}
],
showRollOver: true,contextMenu: mainMenu
})
isc.IButton.create({
left:0, top:240,
title:"Rollover on",
click:"countryList.showRollOver = true;"
})
isc.IButton.create({
left:120, top:240,
title:"Rollover off",
click:"countryList.showRollOver = false;"
})
Comment