Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
contryboy
Posts: 68
Registered: ‎08-16-2012
My Device: BB10 Dev Alpha
Accepted Solution

Is it possible to get/set the cursor postion in a TextArea?

[ Edited ]

Hi All,

 

I went through the documentation, and can not find a way to get/set the cursor position of a TextArea. Anyone has an idea?

 

Thanks,

Dong

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Is it possible to get/set the cursor postion in a TextArea?

[ Edited ]

You want to look at the "editor" property? https://developer.blackberry.com/cascades/reference/bb__cascades__textfield.html#editor


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Is it possible to get/set the cursor postion in a TextArea?

[ Edited ]

(post obsoleted by edit made by OP)


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
contryboy
Posts: 68
Registered: ‎08-16-2012
My Device: BB10 Dev Alpha

Re: Is it possible to get/set the cursor postion in a TextArea?

Thanks, it works fine!

Dong
New Developer
New Developer
rzr
Posts: 151
Registered: ‎01-05-2010
My Device: dev alpha c (bb10)

Re: Is it possible to get/set the cursor postion in a TextArea?

Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: Is it possible to get/set the cursor postion in a TextArea?

[ Edited ]

The editor property is readonly, but the pointer returned points to a mutable object.

You can't assign another editor to TextField, but you can change editor's properties.

 


Andrey Fidrya, @zmeyc on twitter
New Developer
New Developer
rzr
Posts: 151
Registered: ‎01-05-2010
My Device: dev alpha c (bb10)

Re: Is it possible to get/set the cursor postion in a TextArea?

yes i figured out , there are still odd behaviour when probing an unselected text , but I workarounded it , I'll investigate deeper .. will share sources too ...

 

thx