`
hgfghe
  • 浏览: 71173 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
社区版块
存档分类
最新评论

在Flex组件上显示手型的鼠标

 
阅读更多

  在Flex组件上显示手型的鼠标  
  有些时候,我们需要在Flex组件上--Label或者Button上显示手型的鼠标来让某些东西看的更明了,或者就是简单的提醒用户的注意。而默认的通常都是指针形状的,当然要做到手型的鼠标也并非困难的事情。
  你可以在下面的例子中看到,第一个按钮并没有首行指针,这是默认的设置,而第二个就变成了手型的了,同样注意到那个标签,也是手型的,不过同时手型的鼠标,用到Flex的属性却不是一样的,看代码。
  height=303 type=application/x-shockwave-flash width=433 src=http://www.switchonthecode.com/sites/default/f iles/421/source/handcursor.swf mce_src="http://www.switchonthecode.com/sites/defa ult/files/421/source/handcursor.swf">
  要使得在Button上出现手型的鼠标,你必须把buttonMode属性值设置成为true,并且把useHandCursor设置成为true. 对于其他组件你则必须把mouseChildren的属性值设置成为false,这样设置之后就是在上面例子中看到的效果了。 
  
    
  width="300" height="200">  
  width="90%" height="50%" label="No Hand Cursor Button" />  
  width="90%" height="50%" label="Hand Cursor Button"  
  buttonMode="true" useHandCursor="true" />  
  width="100%" height="10%"  text="label with hand cursor"  
  buttonMode="true" useHandCursor="true" mouseChildren="false"/>  
    
   width="300" height="200"> width="90%" height="50%" label="No Hand Cursor Button" /> width="90%" height="50%" label="Hand Cursor Button" buttonMode="true" useHandCursor="true" /> width="100%" height="10%" text="label with hand cursor" buttonMode="true" useHandCursor="true" mouseChildren="false"/> 
  呵呵,蛮有意思的,有兴趣的看看这个网站,不错的: Switch on the code
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics