If you are talking about the old MX TextInput and TextArea, they are based on 
the TextField class in the Flash Player. It is blinking the insertion point and 
you can't change what it looks like.

If you are talking about the new Spark TextInput and TextArea in Flex 4, they 
are based on the Text Layout Framework, which is an ActionScript library 
providing high-level services like layout and editing on top of the Flash Text 
Engine in Player 10. The code for TLF is opensource. You could figure out where 
it draws the caret and change that code. If you're lucky, it will be something 
you can override. If you're unlikely, you might need to monkey-patch TLF.

- Gordon

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of valdhor
Sent: Tuesday, November 24, 2009 5:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Change the caret in TextArea



I do not believe you can inside Flex. If someone else knows differently, please 
chime in.

You should be able to create a custom component with a timer and keyboard event 
listeners to simulate what you want.

This blog post might be a good starting point:

http://joshblog.net/2008/01/17/source-code-for-custom-textfields-with-cool-effects/

--- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
rituraj_tiwari <rituraj.tiw...@...> wrote:
>
>
> Valdhor,
> Thanks for taking the time to respond.
>
> I am not looking to change the mouse pointer cursor. I need to change the
> blinking caret that appears in text input and text area when they are
> editable.
>
> -Raj
>
>
> valdhor-3 wrote:
> >
> > These links should help...
> >
> > http://www.switchonthecode.com/tutorials/flex-custom-cursor-tutorial
> > http://blog.flexexamples.com/2007/09/10/changing-the-cursor-in-a-flex-application-using-the-cursormanager-class/
> > http://www.adobe.com/livedocs/flex/3/langref/mx/managers/CursorManager.html#setCursor%28%29
> >
> > --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> > Shabir Gilkar <shabirgilkar@> wrote:
> >>
> >> Nice question friend, even i do wanna to know the answer
> >>
> >> On 11/23/09, rituraj_tiwari <rituraj.tiwari@> wrote:
> >> >
> >> > Folks,
> >> > I need to implement and editable text area where the cursor (caret) is
> >> > different from the default vertical flashing caret. Is the caret a
> >> > "skinnable" property of TextArea?
> >> >
> >> > In case the flashing vertical line is deeply entrenched, I would like
> >> to be
> >> > able to overlay my own floating caret on top of it to obscure it. Is
> >> there
> >> > an easy way to get the X-Y coordinates of the caret so that I can
> >> move() my
> >> > custom cursor graphic to that location?
> >> >
> >> > Thanks for your help.
> >> > -Raj
> >> > --
> >> > View this message in context:
> >> >
> >> http://old.nabble.com/Change-the-caret-in-TextArea-tp26474743p26474743.html
> >> > Sent from the FlexCoders mailing list archive at Nabble.com.
> >> >
> >> >
> >>
> >>
> >> --
> >> With Regards
> >>
> >> Shabir Ahmad Gilkar
> >>
> >> Srinagar Kashmir J&K
> >>
> >> Voice: +91 9419942501
> >> email: shabirgilkar@
> >> Skype: shabirgilkar
> >>
> >
> >
> >
> >
>
> --
> View this message in context: 
> http://old.nabble.com/Change-the-caret-in-TextArea-tp26474743p26484608.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>

Reply via email to