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

Java Development

Reply
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Carrier: various

Re: Graphics Issue : Need Help

There is a way of getting the field's real extent (relative to the screen, adjusted for scroll etc.): search the forums for getFieldExtent - a nice piece of code written once by Peter Strange. Once you have your field's real extent you can adjust the move points by subtracting field's actual (left, top) coordinates.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.
Developer
peter_strange
Posts: 17,701
Registered: ‎07-14-2008

Re: Graphics Issue : Need Help

Can't claim credit for getFieldExtent, I got that from someone on the old forum, which is long gone so I can't tell you who.

Please use plain text.
Developer
abhi007tyagi
Posts: 215
Registered: ‎09-29-2010
My Carrier: Airtel

Re: Graphics Issue : Need Help

used getGlobalX,Y ---> then called getFieldExtent() --> and subtracted shifted x,y from captured x,y and its looking good now :smileyhappy:

Still need to test on device though

Thanks
Abhinav Tyagi
Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot
Please use plain text.
Developer
abhi007tyagi
Posts: 215
Registered: ‎09-29-2010
My Carrier: Airtel

Re: Graphics Issue : Need Help

One issue remains !!!

 

I still can't click on buttons using toucg screen, only trackwheel works

 

Abhinav Tyagi

Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot
Please use plain text.