开发者

List Component that acts as if control was permanently pressed

I have a list control a开发者_StackOverflow社区nd i want the user to be able to select many items at a time. Thus I want it to act that if the control key is pressed while he is clicking. Eg if he clicks on a selected row it should become unselected and if he clicks on a unselected row it should become selected.

Do you have any idea how to do this?

Thanks,

Dennis


If you want to follow standard UI Precedent; then set allowMultipleSelection to true and teach your users to use the control and/or shift button to select multiple items.

If you want to select multiple items without having the using press the shift or control button you'll have to extend the List class. I did a sample a while ago using the DataGrid:

http://www.flextras.com/blog/index.cfm/2009/7/23/Flextras-Friday-Lunch--Episode-22--07032009--Auto-Select-DataGrid

http://www.flextras.com/labs/AutoSelectDataGrid/

http://www.flextras.com/labs/AutoSelectDataGrid/srcview/index.html

You can probably use the same technique with a List. But, I don't recommend this approach.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜