2007. szeptember 19., szerda

ToolTips for ComboBox Items or List Items

"... I initially thought this should be possible by setting the showDatatips and the dataTipField on the List, but it didn’t work as expected for me."

private var myDropdownFactory:ClassFactory;

private function initApp():void
{
myDropdownFactory = new ClassFactory( List );
myDropdownFactory.properties = { showDataTips:true, dataTipFunction:myDataTipFunction }
}

private function myDataTipFunction( value:Object ):String
{
return ( value.name + "’s blog is " + value.blog );
}


<mx:ComboBox id="myCB" dataProvider="{ myDP }" labelField= name" dropdownFactory="{ myDropdownFactory }" />


http://raghuonflex.wordpress.com/

0 megjegyzés: