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
Super Contributor
Posts: 273
Registered: ‎11-23-2010
My Device: 9800 torch
Accepted Solution

How to get the Field's Exact x and y positions on screen.

Hi Friends,

 

i have to display tooltips in my application on some of fields when i scroll the screen field's position also changes in that situation i won't get the exact x and y positions so any one can u help me to get out of the problem.

 

Thanks in advance.

 

Regards,

Bh1r1th.

Developer
Posts: 16,495
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to get the Field's Exact x and y positions on screen.

we use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/ui/Field.html#getFocusRect(net...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various

Re: How to get the Field's Exact x and y positions on screen.

Search the forums for getFieldExtent - it is a custom piece of code created specifically for that purpose. In brief, you iterate through managers, taking their positions within their managers and correcting for the current scroll offsets.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!