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
Developer
Posts: 109
Registered: ‎02-09-2009
My Device: Not Specified

Need to get location of trackball click

I am trying to make an app that has the idea of a canvas where a user moves a cursor around and clicks to draw lines. How can I mimic the idea of the cursor in the browser? On touch device I can get the coordinates of a click, but that does not seem to be the case with the trackball?

 

What can I do?

 

Thanks! 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Need to get location of trackball click

Just a thought, using the BlackBerry UI, you could create a Bitmap the size of the Display, add this to to a BitmapField, then, when that Field is on focus, override navigationMovement and move and draw your own cursor on the Bitmap.  An interesting exercise!
Highlighted
Developer
Posts: 109
Registered: ‎02-09-2009
My Device: Not Specified

Re: Need to get location of trackball click

Thats what I was afraid of. Is there no component that can do something similar? I suppose I could do a grid of focusable NullFields that keep their position, but thats a lot of fields...

 

Theres gotta be a better way...