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
Posts: 68
Registered: ‎08-16-2012
My Device: BB10 Dev Alpha
My Carrier: NA
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
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

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
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

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!
Highlighted
Developer
Posts: 68
Registered: ‎08-16-2012
My Device: BB10 Dev Alpha
My Carrier: NA

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

Thanks, it works fine!

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

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

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

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
Posts: 151
Registered: ‎01-05-2010
My Device: dev alpha c (bb10)
My Carrier: www.rzr.online.fr

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