Normally getting hand cursors to show on flex components involves setting useHandCursor="true", buttonMode="true", and mouseChildren="false". Sadly this blows up the tree as you aren't able to select anything. The way around this is to set useHandCursor="true" buttonMode="true" on your <mx:Tree/> component and then set super.mouseChildren = false in an itemRenderer like so:
package somepackage
{
import mx.controls.treeClasses.TreeItemRenderer;
import mx.controls.treeClasses.TreeListData;
public class ReportsTreeItemRenderer extends TreeItemRenderer
{
public function ReportsTreeItemRenderer()
{
super();
}
override public function set data(value:Object):void
{
super.data = value;
if( super.data )
{
super.mouseChildren = false;
if( TreeListData(listData).depth == 1 )
setStyle('fontWeight', 'bold');
else {
setStyle('fontWeight', 'normal');
}
}
}
}
}
Muito obrigado !!
ReplyDeletesalvou minha vida !
You're a life saver man. :)
ReplyDeleteThanks a ton.