No problem, Mike, it happens all the time.
The price I pay for having a first name embedded in my last name. J
opps,
Jim, looked at your last name :)
Mike
On 6/9/06, Michael
Schmalle <[EMAIL PROTECTED]>
wrote:
AH!!!
That was one other thing I was going to try!!!
mouseChildren.
I couldn't get why it would matter. That is what you get for trying to
multi-task.
Rob, I gave it my best ;-)
Peace, Mike
On 6/9/06, Peter
Baird <
[EMAIL PROTECTED]> wrote:
Manish Jenathi blogged about
this a while back, but I'm not seeing the blog entry anymore.
Anyway, the following works, and I believe is the recommended approach:
<mx:Text width="100%" text="hello"
useHandCursor="true"
buttonMode="true"
mouseChildren="false"
/>
Per Manish's explanation (as best I remember), the component needs to know that
it has no "mouseChildren" to listen for.
-Peter
Hi Mike,
Thanks for looking into this. I tried your suggestion, but the cursor still
turns back into an arrow when it gets over the text field. My code is below; if
I did not correctly follow your suggestion, please let me know where I went
wrong:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>
<![CDATA[
private
function onInit(event:Event):void
{
txtItem.mx_internal::textField.mouseEnabled
= false;
}
]]>
</mx:Script>
<mx:VBox
width="400" height="700" buttonMode="true"
useHandCursor="true">
<mx:Text
id="txtItem" text="The quick brown fox jumps over the lazy dog.
" selectable="false" />
</mx:VBox>
</mx:Application>
Hi,
1) the internal textfield has no useHandCursor property, this kills one hack.
2) Text control has no border, so there is nothing to hit when you set the
component's useHandCursor to true.
3) The internal textfield is eating the event
4) wrap it with a VBOX or the like
This does work
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
creationComplete="onInit(event)">
<mx:Script>
<![CDATA[
private
function onInit(event:Event):void
{
txtItem.mx_internal::textField.mouseEnabled
= false;
}
]]>
</mx:Script>
<mx:VBox buttonMode="true"
useHandCursor="true" >
<mx:Text
id="txtItem" text="The quick brown fox jumps over the lazy dog.
" selectable="false" />
</mx:VBox>
</mx:Application>
Adjust to what you need but, there is a hack here.
Peace, Mike
I have the exact same problem, and do not have a solution.
If you put handCursor on a Box where you text resides, it does not work
either.
Best,
JL
----- Original Message -----
From: Jim Robson <mailto:[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, June 09,
2006 3:18 PM
Subject: [flexcoders] F2B3:
useHandCursor property of Text control
Per the docs, the useHandCursor property is inherited from the Sprite
class. However, it doesn't seem to work on the Text control. When set to
"true", the mouse cursor remains an arrow instead of changing to a
button when over the text field:
<mx:Text id="txtItem" text="The quick brown fox jumps
over the lazy dog. " buttonMode="true"
selectable="false" useHandCursor="true" />
What am I missing?
8888/ \8888® PETER BAIRD
888/ \888
User
Experience Consultant
88/
/ \88 Adobe Consulting | Adobe
Systems, Inc
8/
/8\ \8 275 Grove St. Newton, MA
/
/888\ \ Office: 617.219.2126 |
Cell: 617.803.6804
\8\ AIM:
pbaird00 | Y!IM: pbaird00
--
What goes up, does come down.
--
What goes up, does come down.
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___
|