3.在库面板的LabelCellRenderer上单击右键,从菜单中选择“linkage...”。点击“Export for ActionScript”,使用“com.darronschall.LabelCellRenderer”作为AS2.0的类。而且确定“LabelCellRenderer”作为ID。
jyhan Publish at 2006-6-6 17:39:34 // generic event handler function change(eventObj) { trace(eventObj.target.selectedItem.data); }
// populate the list box - note the html in the "label" string myList.addItem({label:"<b>Apples</b> ... <font color=\"#FF0000\">are <u>red</u></font>", data:"apple"}); myList.addItem({label:"<b>Oranges</b> ... <font color=\"#FF9900\">are <u>orange</u></font>", data:"orange"}); myList.addItem({label:"<b>Bananas</b> ... <font color=\"#FFCC00\">are <u>yellow</u></font>", data:"banana"}); myList.addItem({label:"<b>Pears</b> ... <font color=\"#009900\">are <u>green</u></font>", data:"pear"});
// turn off the vertical scrollbar to get // rid of the "empty box" that appears when // there isn't enough content to scroll myList.vScrollPolicy = "off";
// use the LabelCellRenderer to display the label // in the listbox and allow for html myList.cellRenderer = "LabelCellRenderer";
myList.addEventListener("change", this);
// just use a default gray style, as the haloGreen // doesn't look quite right with our colors in the list _global.style.setStyle("themeColor", 0xCCCCCC);wintry Publish at 2006-2-11 16:05:35 为什么不可以显示 只能显示原代码VictorLee Publish at 2005-4-26 19:39:49 好了!可以了!VictorLee Publish at 2005-4-26 16:17:16 评分3 为什么我按照原文这么做下来,还是不行呢?显示的都是[object Object],想问问这是为什么呢?trace的是undefined,何故?谁能解答呢?
218.14.28.28 Publish at 2004-5-28 11:25:44 为什么我按照上面的步骤做,但是效果不是那样呢?也就是不支持HTML,为什么?