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
bb7ganesh
Posts: 48
Registered: ‎12-11-2008
My Device: Not Specified

"How to find cursor position and click event raise"

HI guys,

 

Am new in BB Strom (9530).  i have one image (360X480) i drew this image at screen. here my requirement is , i need to make diferent event when i click different position on the image....... 

 

guide me..

Developer
jhaehnle
Posts: 238
Registered: ‎08-26-2008
My Device: Not Specified

Re: "How to find cursor position and click event raise"

[ Edited ]

Hi,

 

use one of the fields below and use method....

getCursorPosition() - Method in class net.rim.device.api.ui.component.TextField

getCursorPosition() - Method in class net.rim.device.api.ui.component.RichTextField

getCursorPosition() - Method in class net.rim.device.api.ui.component.PasswordEditField

getCursorPosition() - Method in class net.rim.device.api.ui.component.BasicEditField

 

Put drawing into background of field. Then it should work, hopefully.....

Maybe you have to overload the field in order to paint the drawing into background.....

just have a try!

 

Regards,

Jochen

Message Edited by jhaehnle on 12-17-2008 09:40 AM
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: "How to find cursor position and click event raise"

using the 4.7 touch interface on the Storm, you would just get the x,y position of the touch.

 

I think you should probably look at the "touch sample" code in the 4.7 JDE and read some of the API documentation before you open more threads.