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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Regular Contributor
contryboy
Posts: 55
Registered: ‎08-16-2012
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

Please use plain text.
Developer
peter9477
Posts: 5,616
Registered: ‎12-08-2010
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 -- (PlayBook 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!
Please use plain text.
Developer
peter9477
Posts: 5,616
Registered: ‎12-08-2010
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 -- (PlayBook 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!
Please use plain text.
Regular Contributor
contryboy
Posts: 55
Registered: ‎08-16-2012
My Carrier: NA

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

Thanks, it works fine!

Dong
Please use plain text.
New Developer
New Developer
rzr
Posts: 133
Registered: ‎01-05-2010
My Carrier: www.rzr.online.fr

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

this editor is set read only , so how to change value from code ?

 

--
http://rzr.online.fr/q/qnx# #RedaK Libre #TextEditor Available on #QnX #bb10 appworld for free and opensource
Please use plain text.
Developer
Zmey
Posts: 885
Registered: ‎12-18-2012

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.

 

Please use plain text.
New Developer
New Developer
rzr
Posts: 133
Registered: ‎01-05-2010
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

 

--
http://rzr.online.fr/q/qnx# #RedaK Libre #TextEditor Available on #QnX #bb10 appworld for free and opensource
Please use plain text.