开发者

OS like behavior when edditing a Tree item!

开发者 https://www.devze.com 2022-12-16 21:16 出处:网络
I have a Tree Control inside my Flex Application which I want to edit on a doubleclick on a tree item. I found the properties doubl开发者_高级运维eClickEnabled=\"true\", doubleClick=\"startEditMode()\

I have a Tree Control inside my Flex Application which I want to edit on a doubleclick on a tree item. I found the properties doubl开发者_高级运维eClickEnabled="true", doubleClick="startEditMode()", and editable="true". With these functions I can detect a double click and I can change the editable property to true based on a double click.

The problem is that after I double clicked on a Item i have to click once more to really enter the edit mode. That doesn't seem to be intuitive at all...

Somebody came up with the solution to make a additional click programaticaly:

clickedItemRenderer.dispatchEvent(new MouseEvent(MouseEvent.CLICK));

The problem I have is to get the clickedItemRenderer out of the doubleclick event (MouseEvent). How can I do that? Is there a other solution tho simply enter the edit mode by double click on the tree object?

Thanks for any hints! Markus

0

精彩评论

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