Flex 3:当鼠标悬停在文本输入上时,如何更改鼠标光标?
在 Flex 中,默认情况下,当您将鼠标悬停在文本输入上时,鼠标光标将更改为标准 I 十字栏。 如何更改此光标,以便显示常规鼠标指针光标而不是 I 十字栏?
更新:嗯,根据这篇博客文章,Flex 4 中的这个过程似乎非常简单: http://blog.flexexamples.com/2008/11/03/setting-mouse-cursors-in-flash-player-10/
自从我'我暂时坚持使用 Flex 3,我该如何做类似的事情?
update2:另外,这个问题有点类似于这个问题: 避免在 Flash CS3 中的动态文本字段上更改光标
不过,我使用的是标准 Flex Builder,而不是 Flash CS3。
In Flex, by default, when you mouse over a Text Input the mouse cursor is changed to the standard I cross bar. How can I change this cursor so the regular mouse pointer cursor is shown rather than the I cross bar?
update: Well, it seems this process is dirt simple in Flex 4 according to this blog post: http://blog.flexexamples.com/2008/11/03/setting-mouse-cursors-in-flash-player-10/
Since I'm stuck with Flex 3 for the time being, how can I do something similar?
update2: Also, this question is somewhat similar to this question:
Avoiding cursor change over dynamic text fields in Flash CS3
Though, I am using the standard Flex Builder, not Flash CS3.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
必须修改三个属性
使用手形光标 = true
按钮模式 = true
mouseChildren = false
Leete 本文的更多信息 http://www.anujgakhar.com/2008/03/27/flex-how-to-display-hand-cursor-on-components/
There are three properties that must be modified
useHandCursor = true
buttonMode = true
mouseChildren = false
Leete more information this article http://www.anujgakhar.com/2008/03/27/flex-how-to-display-hand-cursor-on-components/
您必须使用 CursorManager:
You have to use the CursorManager:
您可以使用带有标签的 HBOX,而不是 TextInput。 当鼠标悬停在标签上时,系统不会改变光标。 如果您希望用户可以编辑文本,您将需要做更多的工作。
You could use a HBOX with a Label instead of a TextInput. The system will not change the cursor when the mouse is over the Label. If you want the text to be editable by the user you will need to do some more work.
还有另一种方法,可以将您想要的任何组件的 buttonMode 属性设置为 true。 这将带来鼠标光标而不是文本光标。
there is also another way by setting buttonMode property to true for any component you wish. this brings the mouse cursor instead of text cursor.
只是为了澄清 - MouseCursor和 Mouse 类也存在于Flash 10 上的 Flex 3。
因此,您可以挂钩 MOUSE_OVER 和 MOUSE_OUT 事件:
Just to clarify - the MouseCursor and Mouse classes exist also in Flex 3 on flash 10.
So you can hook to the MOUSE_OVER and MOUSE_OUT events: