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

Java Development

Reply
New Developer
Mark-PMI
Posts: 44
Registered: ‎02-02-2010
My Device: 8320

Need Help with navigationMovement and Scrolling Within a Field

I am trying to use navigationMovement to manage the effect of scrolling within a Field; i.e. I want to highlight certain parts of the field as the cursor moves around the field. However, navigationMovement only gives dx and dy. How do I find the absolute position of the "cursor" so I can determine to what part of the Field the cursor is pointing? I can't seem to find any other Field methods that give the cursor location. Can I add a ScrollChangeListener to a Field? Are there any downsides to this approach? It seems I may be going about this the wrong way.

 

Thanks!

 

Mark

Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Need Help with navigationMovement and Scrolling Within a Field

There is no "cursor position", unless you establish it.

 

My advice is to pick an arbitrary point for the initial cursor position, then apply your dx,dy to this position, moving the focus as needed.