[转] 彻底禁止spark list中某些item被选中

之所以加一个彻底, 是因为还有一种不彻底的表面文章的做法: 自定义皮肤, 将selected state全部不处理.

而本方案连最原始的相关事件和数据都xx掉.

原文链接: http://flexponential.com/2009/12/20/disable-selection-on-some-items-in-a-spark-list/

主要思路是重载了setSelectedIndex 和 setSelectedIndices 两个函数.

另外再补一条: 上面只能让这个item不能被selected, 如果你连hover都觉得不爽的话, 你可以重载

function set hovered(v:Boolean).

smithfox | Wednesday 02 March 2011 at 6:14 pm | | UI        | Used tags: , , , ,

One comment

Hermes iPhone 6 Case

We’re taking this rumour with a pinch of salt for now, unless any further evidence emerges. And of course, if it does we’ll update you right here.

Hermes iPhone 6 Case, (URL) - 04-06-’15 14:25
(optional field)
(optional field)
为阻止垃圾广告, 请在提交评论前, 回答一个简单问题(Please answer an simple question)
Remember personal info?
Notify
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.