开发者

flex tree selection color just on double click

Ho开发者_StackOverflow社区w could i disable the selection color on single click and enable it just to double click.


Flex 3 answer...

You'll need to extend the Tree class and override the drawItem method to remove the highlight child that is added.

It's as easy as

protected override function drawItem( item : IListItemRenderer, selected:Boolean = false, highlighted : Boolean = false, caret : Boolean = false, transition : Boolean = false ) : void {
    super.drawItem( item, selected, false, caret, transition );
}

Then add listeners for clicks and doubleclicks that replicate the functionality of the highlight code you prevented happening in the overridden method.

Note this doesn't stop the row actually being selected, it just alters the highlight, so it may be a bit confusing for users to have the highlight missing but still have a row selected.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜