为节点或叶子设定其特有之ToolTip:
// Constructor public function TreeForCodeMaintain(codeMaintainService_:ICodeMaintainService) { super(); _codeMaintainService = codeMaintainService_; dataProvider = dataProvider = ["code1", "code2", "code3", ["folder1", ["subCode1", "subCode2", ["subFolder1", ["sc1", "sc2"]]]]]; dataDescriptor = new TreeDDForCodeMaintain(); labelFunction = labelFunForTree; dataTipFunction = dataTipFunctionForTreeCode; showDataTips = true; } protected function dataTipFunctionForTreeCode(item:Object):String { if(item is Array) { return String(item[0]); } // return item.toString(); return AppContext.getInstance().metaDomain.getEntityByName(String(item)).descriptionLocalized; }
效果:
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.